- Tutorials
- Getting started on Mac
- Setting up the FreeSewing development environment
Setting up the FreeSewing development environment
FreeSewing provides a development environment to help you design and develop patterns.
There are two ways to run this development environment:
- Monorepo development: Use this if you intend to contribute your work to FreeSewing
- Stand-alone development: Use this if you want to do your own thing, and not contribute to FreeSewing
Monorepo development
This is the recommended way for (aspiring) FreeSewing contributors
TL;DR
git clone https://github.com/freesewing/freesewing
cd freesewing
yarn kickstart
Even better: clone your own fork
git clone https://github.com/your-username/freesewing
cd freesewing
yarn kickstart
This sets up the monorepo. If you would like to create a new design, run the following command:
yarn new design
If you’d like to create a new plugin, run this variant instead:
yarn new plugin
Step by step
These docs assume you have git installed. But if you’re running macOS, you have git, right?
Install yarn
Our repository uses yarn workspaces. So you’ll need yarn
to work with it.
To install it run:
npm install yarn --global
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://github.com/freesewing/freesewing/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://github.com/your-username/freesewing
but
obviously with your real username rather than your-username
.
Install dependencies
Enter the directory that was created, and run the yarn kickstart
command:
cd freesewing
yarn kickstart
Now you’re ready to start the development environment.
Creating a new design
If you would like to create a new design, run the following command:
yarn new design
Creating a new plugin
If you’d like to create a new plugin, run the following command:
yarn new plugin
Stand-alone development
With Node.js installed, all you need to do to setup the stand-alone development environment is run this command:
npx @freesewing/new-design
After you’ve answered some questions, it will take a while to set everything up. When it’s done, you will have a new folder with the development environment inside.
Now you’re ready to start the development environment.
The folder will have the name you chose above.
Questions
What template to use
Use From scratch
unless you want to start from our of our blocks:
- Use
Extend Brian
to start from Brian - Use
Extend Bent
to start from Bent - Use
Extend Bella
to start from Bella - Use
Extend Breanna
to start from Breanna - Use
Extend Titan
to start from Titan
What name to use
This will become the name of your design. Stick to [a-z] here to avoid problems.
If you’re not certain what to pick, just mash some keys, it doesn’t matter.
What package manager to use
You may wish to choose yarn
since that is the package manager
that we use when doing work in the monorepo,
and many of our tutorials are written to use yarn
.
However, it doesn’t really matter.
You can choose either yarn
or npm
as you wish.