配置 open clothes 开发环境
open clothes provides the studio, a development environment to help you design and develop patterns.
There are two ways to run this studio:
- 源码仓库工作室: Use this if you intend to contribute your work to open clothes
- Stand-alone studio: Use this if you want to do your own thing, and not contribute to open clothes
源码仓库工作室
This is the recommended way for (aspiring) open clothes contributors
TL;DR
git clone https://codeberg.org/open clothes/openclothes.git
cd openclothes
npm run kickstart
Even better: clone your own fork
git clone https://codeberg.org/your-username/openclothes.git
cd openclothes
npm run kickstart
This sets up the monorepo. If you would like to create a new design or plugin, run the following command:
npm run add
分步说明
These docs assume you have git installed. But if you're running Linux, you have git, right?
Fork our repository
You'll want to fork our repository. This way you have your own copy where you can make all the changes you want. To do so, visit https://codeberg.org/open clothes/open clothes/fork
Clone the forked repository
Now that you have your very own fork, it's time to clone it locally.
git clone <url to your fork>
Make sure to use the URL to your own fork, typically https://codeberg.org/your-username/openclothes.git but
obviously with your real username rather than your-username.
Install dependencies
Enter the directory that was created, and run the npm run kickstart command:
cd openclothes
npm run kickstart
Now you're ready to start the development environment.
创建新设计或插件
If you would like to create a new design or plugin, run the following command:
npm run add
After you've answered some questions, it create a new
sub-folder for your design in the designs folder.
Now you're ready to start the development environment.
独立开发
With Node.js installed, all you need to do to setup the stand-alone development environment is run this command:
npx @openclothes/studio
After you enter the folder name to create, it will take a while to set everything up. When it's done, you will have a new folder with the development environment inside.
创建新设计
If you would like to create a new design, enter the folder that was just created and run the following command:
npm run add
After you've answered some questions, it create a new
sub-folder for your design in the designs folder.
Now you're ready to start the development environment.