chore: Updates to docs for new dev env
This commit is contained in:
parent
474188a05e
commit
8cd70bc451
37 changed files with 500 additions and 350 deletions
|
@ -1,33 +0,0 @@
|
|||
---
|
||||
title: Setting up the FreeSewing development environment
|
||||
order: 40
|
||||
---
|
||||
|
||||
FreeSewing provides a development environment to help you design and develop patterns.
|
||||
|
||||
With Node installed, all you need to do to setup this development environment is run this command:
|
||||
|
||||
```bash
|
||||
npx create-freesewing-pattern
|
||||
```
|
||||
|
||||
It will take a moment to download some dependencies, and then will ask you the following questions.
|
||||
|
||||
You can change all of these later. It's just to get you started.
|
||||
If you're not sure what to fill in, you can stick with the defaults or leave them blank.
|
||||
Only a few of these are mandatory.
|
||||
|
||||
- **Language**: Use the arrow keys to chose the language of your choice
|
||||
- **Pattern name**: This will be the name of your pattern, but also the name of the folder we'll setup for you. If you're just kicking the tires, something like `test` will do you fine.
|
||||
- **description**: A description of your pattern. It's not mandatory.
|
||||
- **Pattern type**: Use the arrow keys to chose either `block` or `pattern`. Choose `pattern` if you're not sure what to pick
|
||||
- **department**: Use the arrow keys to pick a department like `tops`, `bottoms` or `accessories`. This is is only relevant if you decide to publish your pattern later. But by that time you will have learned how to change this.
|
||||
- **Author**: You can enter your name, or leave this blank for now
|
||||
- **GitHub repository**: You can leave this blank for now
|
||||
- **Package manager**: Choose either `npm` or `yarn` as your package manager. If you're not sure, pick `npm`.
|
||||
|
||||
When you've answered all questions, the command will download the development enviroment,
|
||||
and set it up based on the choices you made.
|
||||
|
||||
This step will take anywhere from a few to about 10 minutes to complete.
|
||||
But when it's done, you will have a new folder with the development environent inside.
|
118
markdown/dev/tutorials/getting-started-linux/dev-setup/en.md
Normal file
118
markdown/dev/tutorials/getting-started-linux/dev-setup/en.md
Normal file
|
@ -0,0 +1,118 @@
|
|||
---
|
||||
title: Setting up the FreeSewing development environment
|
||||
order: 40
|
||||
---
|
||||
|
||||
FreeSewing provides a development environment to help you design and develop patterns.
|
||||
|
||||
There are two ways to run this development environment:
|
||||
|
||||
- [**Monorepo development**](#monorepo-development): Use this if you intend to contribute your work to FreeSewing
|
||||
- [**Stand-alone development**](#stand-alone-development): Use this if you want to do your own thing, and not contribute to FreeSewing
|
||||
|
||||
## Monorepo development
|
||||
|
||||
<Note compact>This is the recommended way for (aspiring) FreeSewing contributors</Note>
|
||||
|
||||
### TL;DR
|
||||
|
||||
```bash
|
||||
git clone https://github.com/freesewing/freesewing
|
||||
cd freesewing
|
||||
yarn kickstart
|
||||
```
|
||||
|
||||
<Tip>
|
||||
Even better: [clone your own fork](https://github.com/freesewing/freesewing/fork)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/your-username/freesewing
|
||||
cd freesewing
|
||||
yarn kickstart
|
||||
```
|
||||
|
||||
</Tip>
|
||||
|
||||
### Step by step
|
||||
|
||||
<Comment by="joost">
|
||||
These docs assume you have git installed.
|
||||
But if you're running Linux, you have git, right?
|
||||
</Comment>
|
||||
|
||||
#### Install yarn
|
||||
Our repository uses yarn workspaces. So you'll need yarn to work with it.
|
||||
|
||||
To install it run:
|
||||
|
||||
```bash
|
||||
npm i -G yarn
|
||||
```
|
||||
|
||||
#### 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, time to clone it locally.
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
cd freesewing
|
||||
yarn kickstart
|
||||
```
|
||||
|
||||
Now you're ready to [start the development environment](/tutorials/getting-started-linux/dev-start).
|
||||
|
||||
## Stand-alone development
|
||||
|
||||
With NodeJS installed, all you need to do to setup the stand-alone development environment is run this command:
|
||||
|
||||
```bash
|
||||
npx @freesewing/new-design
|
||||
```
|
||||
|
||||
After you've answered [some questions](#questions), it will take a while to set everything up.
|
||||
When it's done, you will have a new folder with the development environent inside.
|
||||
|
||||
Now you're ready to [start the development environment](/tutorials/getting-started-linux/dev-start).
|
||||
|
||||
<Tip compact>The folder will have the name you chose above</Tip>
|
||||
|
||||
<Note>
|
||||
### 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](https://freesewing.org/designs/brian)
|
||||
- Use `Extend Bent` to start from [Bent](https://freesewing.org/designs/bent)
|
||||
- Use `Extend Bella` to start from [Bella](https://freesewing.org/designs/bella)
|
||||
- Use `Extend Breanna` to start from [Breanna](https://freesewing.org/designs/breanna)
|
||||
- Use `Extend Titan` to start from [Titan](https://freesewing.org/designs/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
|
||||
|
||||
Chose `npm` if you don't have `yarn` are when you're not sure what the heck `yarn` is.
|
||||
|
||||
</Note>
|
||||
|
||||
|
62
markdown/dev/tutorials/getting-started-linux/dev-start/en.md
Normal file
62
markdown/dev/tutorials/getting-started-linux/dev-start/en.md
Normal file
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
title: Start the development environment
|
||||
order: 50
|
||||
---
|
||||
|
||||
FreeSewing provides a development environment to help you design and develop patterns.
|
||||
|
||||
There are two ways to run this development environment:
|
||||
|
||||
- [**Monorepo development**](#monorepo-development): Use this if you intend to contribute your work to FreeSewing
|
||||
- [**Stand-alone development**](#stand-alone-development): Use this if you want to do your own thing, and not contribute to FreeSewing
|
||||
|
||||
## Monorepo development
|
||||
|
||||
Run `yarn lab` to start the development environment:
|
||||
|
||||
```bash
|
||||
yarn lab
|
||||
```
|
||||
|
||||
Then point your browser to http://localhost:8000
|
||||
|
||||
<Tip>
|
||||
### Adding a new design
|
||||
This is all you need to work on existing designs. If you'd like to add a new design, run:
|
||||
|
||||
```bash
|
||||
yarn new design
|
||||
```
|
||||
|
||||
Just make sure to re-start the lab afterwards with `yarn lab`
|
||||
</Tip>
|
||||
|
||||
## Standalone development
|
||||
|
||||
You will have a new folder that has the name you picked for your design.
|
||||
If you chose `test`, you will have a `test` folder. If you chose `banana`, you'll have a `banana` folder.
|
||||
|
||||
The `design` subfolder holds your design's configuration file and source code.
|
||||
You can ignore all other folders and files, they are part of the development environment.
|
||||
|
||||
To start the development environment, enter the folder hat was created
|
||||
and run `npm run start` (or `yarn start` if you're using Yarn as a package manager).
|
||||
|
||||
Then open your browser and go to http://localhost:8000
|
||||
|
||||
<Tip>
|
||||
The development environment will watch for any changes you make to
|
||||
the pattern's source code or configuration.
|
||||
When you do, it will update automatically in your browser.
|
||||
</Tip>
|
||||
|
||||
<Note>
|
||||
|
||||
##### Yay, you're done!
|
||||
|
||||
All you have to do now, is design your pattern.
|
||||
Thankfully, we have a tutorial for that too:
|
||||
|
||||
- [Pattern design tutorial](/tutorials/pattern-design/): A step-by-step guide to designing your first pattern
|
||||
|
||||
</Note>
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Getting started on Linux
|
||||
order: 10
|
||||
order: 15
|
||||
for: developers
|
||||
icons:
|
||||
- start
|
||||
|
|
|
@ -6,9 +6,14 @@ order: 20
|
|||
Now we will use nvm to install Node JS. Run the following command:
|
||||
|
||||
```bash
|
||||
nvm install lts/*
|
||||
nvm install lts/fermium
|
||||
```
|
||||
|
||||
This will install the most recent so-called LTS version on your system.
|
||||
This will install the so-called LTS version of Node 14 on your system.
|
||||
|
||||
LTS versions -- short for Long Term Support -- are good node versions
|
||||
to use because they are stable and supported for a long time.
|
||||
|
||||
<Note compact>
|
||||
Node 14 is required to use our monorepo [until we upgrade Strapi](https://github.com/freesewing/freesewing/issues/2351).
|
||||
</Note>
|
||||
|
|
|
@ -14,16 +14,19 @@ the node.js website, or from a package provided by your linux distribution:
|
|||
- You can easily switch between different Node versions
|
||||
- Everything gets installed in your home folder, avoiding permission problems
|
||||
|
||||
To setup nvm, run the following command in a terminal:
|
||||
To setup nvm, [follow the install instructions in the nvm
|
||||
README](https://github.com/nvm-sh/nvm#installing-and-updating).
|
||||
|
||||
The TL;DR: is to run the following command in a terminal:
|
||||
|
||||
```bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
||||
```
|
||||
|
||||
If you don't have `curl` on your system, here's an alternative approach using `wget`:
|
||||
|
||||
```bash
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
||||
```
|
||||
|
||||
After the script is completed, try running the following command:
|
||||
|
|
|
@ -52,3 +52,8 @@ nvm use v10.22.1
|
|||
|
||||
If you picked a version that is not installed, `nvm` will simply tell you
|
||||
and even suggest the command you should type to install it. Handy!
|
||||
|
||||
<Note compact>
|
||||
Node 14 is required to use our monorepo [until we upgrade Strapi](https://github.com/freesewing/freesewing/issues/2351).
|
||||
</Note>
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
title: Start the development environment
|
||||
order: 50
|
||||
---
|
||||
|
||||
You will have a new folder that has the name you picked for your pattern.
|
||||
If you chose `test`, you will have a `test` folder. If you chose `banana`, you'll have a `banana` folder.
|
||||
|
||||
If you enter that folder, you'll find a couple of subfolders:
|
||||
|
||||
- `config` holds your pattern's configuration file
|
||||
- `src` holds your pattern's source code
|
||||
- `example` holds the development environment
|
||||
|
||||
To start the development environment, enter the `example` folder and run: `npm run start` (or `yarn start` if you're using Yarn as a package manager.
|
||||
|
||||
The development environment will watch for any changes you make to
|
||||
the pattern's source code. When you do, it will update automatically in your browser.
|
||||
|
||||
<Note>
|
||||
|
||||
##### Yay, you're done!
|
||||
|
||||
All you have to do now, is design your pattern.
|
||||
Thankfully, we have a tutorial for that too:
|
||||
|
||||
- [Pattern design tutorial](/tutorials/pattern-design/): A step-by-step guide to designing your first pattern
|
||||
|
||||
</Note>
|
Loading…
Add table
Add a link
Reference in a new issue