Merge branch 'develop' into i18n
This commit is contained in:
commit
879e41b038
22 changed files with 819 additions and 174 deletions
|
@ -22,6 +22,8 @@ create-freesewing-pattern:
|
||||||
modulebuild: '!'
|
modulebuild: '!'
|
||||||
cibuild_step1: '!'
|
cibuild_step1: '!'
|
||||||
build: '!'
|
build: '!'
|
||||||
|
test: 'BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.mjs'
|
||||||
|
testci: 'BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.mjs'
|
||||||
css-theme:
|
css-theme:
|
||||||
cibuild_step1: 'npx node-sass --output-style compressed src/theme.scss dist/theme.css'
|
cibuild_step1: 'npx node-sass --output-style compressed src/theme.scss dist/theme.css'
|
||||||
build: 'npx node-sass --output-style compressed src/theme.scss dist/theme.css'
|
build: 'npx node-sass --output-style compressed src/theme.scss dist/theme.css'
|
||||||
|
|
12
markdown/.remarkrc.yaml
Normal file
12
markdown/.remarkrc.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
settings:
|
||||||
|
bullet: "-"
|
||||||
|
plugins:
|
||||||
|
- remark-frontmatter
|
||||||
|
- remark-preset-lint-consistent
|
||||||
|
- remark-preset-lint-recommended
|
||||||
|
- - remark-lint-list-item-indent
|
||||||
|
- "space"
|
||||||
|
- - remark-lint-emphasis-marker
|
||||||
|
- "_"
|
||||||
|
- - remark-lint-strong-marker
|
||||||
|
- "*"
|
|
@ -13,13 +13,12 @@ Obviously, the order in which you add points to your code needs to take a backse
|
||||||
to the logic of your code. But typically what you're doing is constructing an outline
|
to the logic of your code. But typically what you're doing is constructing an outline
|
||||||
of (a part of) a garment.
|
of (a part of) a garment.
|
||||||
|
|
||||||
So pick a point, and make your way around counter-clockwise.
|
So pick a point, and make your way around counter-clockwise.
|
||||||
|
|
||||||
When naming control points for curves, re-use the name of the point they are attached to
|
When naming control points for curves, re-use the name of the point they are attached to
|
||||||
and add `Cp1` to the control point before and `Cp2` to the control point after the point if
|
and add `Cp1` to the control point before and `Cp2` to the control point after the point if
|
||||||
, once again, you'd follow your path counter-clockwise.
|
, once again, you'd follow your path counter-clockwise.
|
||||||
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
@ -19,7 +19,7 @@ Its goal is to determine whether we should draft a *complete* pattern, or merely
|
||||||
|
|
||||||
The [paperless](/reference/api/settings#paperless) setting is a boolean that is either true or false.
|
The [paperless](/reference/api/settings#paperless) setting is a boolean that is either true or false.
|
||||||
|
|
||||||
A *paperless* pattern is a pattern that has extra dimensions so users can trace the
|
A *paperless* pattern is a pattern that has extra dimensions so users can trace the
|
||||||
paper on fabric or paper without having the need to print it.
|
paper on fabric or paper without having the need to print it.
|
||||||
|
|
||||||
## Seam allowance
|
## Seam allowance
|
||||||
|
@ -62,4 +62,3 @@ export default function(part) {
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,9 @@ certain measurements differently.
|
||||||
|
|
||||||
<Tip>
|
<Tip>
|
||||||
|
|
||||||
###### See our measurements page for standard measurement names
|
###### See our measurements page for standard measurement names
|
||||||
|
|
||||||
The [measurements reference page](/reference/measurements/)
|
The [measurements reference page](/reference/measurements/)
|
||||||
contains all our standard measurement names.
|
contains all our standard measurement names.
|
||||||
|
|
||||||
</Tip>
|
</Tip>
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,9 @@ title: Re-use options
|
||||||
order: 20
|
order: 20
|
||||||
---
|
---
|
||||||
|
|
||||||
The same arguments for re-using measurements are also (somewhat) true for options.
|
The same arguments for re-using measurements are also (somewhat) true for options.
|
||||||
|
|
||||||
While your pattern may require some very specific
|
While your pattern may require some very specific
|
||||||
options, there's probably a bunch that are similar to other patterns. Re-use those names.
|
options, there's probably a bunch that are similar to other patterns. Re-use those names.
|
||||||
|
|
||||||
As in, `bicepsEase` exists. So don't go creating an `upperArmEase` option.
|
As in, `bicepsEase` exists. So don't go creating an `upperArmEase` option.
|
||||||
|
|
||||||
|
|
|
@ -5,22 +5,22 @@ order: 50
|
||||||
|
|
||||||
When designing patterns, you should refrain from using absolute values.
|
When designing patterns, you should refrain from using absolute values.
|
||||||
|
|
||||||
That 6cm ease you add might be fine for all scenarios you tested,
|
That 6cm ease you add might be fine for all scenarios you tested,
|
||||||
but then somebody comes around who is twice your size, or who is making clothes for a doll,
|
but then somebody comes around who is twice your size, or who is making clothes for a doll,
|
||||||
and things will go off the rails.
|
and things will go off the rails.
|
||||||
|
|
||||||
Don't be tempted to add absolute values to your patterns, as they don't scale.
|
Don't be tempted to add absolute values to your patterns, as they don't scale.
|
||||||
Instead, embrace percentages as options.
|
Instead, embrace percentages as options.
|
||||||
|
|
||||||
<Tip>
|
<Tip>
|
||||||
|
|
||||||
##### Use the antperson tests
|
##### Use the antperson tests
|
||||||
|
|
||||||
To check how well your pattern scales, you can
|
To check how well your pattern scales, you can
|
||||||
use the *antperson* test by sampling the pattern for 2 models:
|
use the *antperson* test by sampling the pattern for 2 models:
|
||||||
|
|
||||||
- A model with measurements of avarage person (the person)
|
- A model with measurements of avarage person (the person)
|
||||||
- A model with measurements 1/10th of an average person (the ant)
|
- A model with measurements 1/10th of an average person (the ant)
|
||||||
|
|
||||||
A well-designed pattern will scale a factor 10 down and hold its shape.
|
A well-designed pattern will scale a factor 10 down and hold its shape.
|
||||||
If your pattern makes assumptions about size, this test will show that.
|
If your pattern makes assumptions about size, this test will show that.
|
||||||
|
@ -29,4 +29,3 @@ FreeSewing's development environment provides these tests out of the box,
|
||||||
so you can see their results at the click of a button.
|
so you can see their results at the click of a button.
|
||||||
|
|
||||||
</Tip>
|
</Tip>
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,14 @@ order: 60
|
||||||
|
|
||||||
Don't insert literal text in your patterns. Instead, insert a key that can then be translated.
|
Don't insert literal text in your patterns. Instead, insert a key that can then be translated.
|
||||||
|
|
||||||
For example, if you want to put *Finish with bias tape* on your pattern, don't be
|
For example, if you want to put *Finish with bias tape* on your pattern, don't be
|
||||||
tempted to do this:
|
tempted to do this:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
path.seam.attr("data-text", "Finish with bias tape");
|
path.seam.attr("data-text", "Finish with bias tape");
|
||||||
```
|
```
|
||||||
|
|
||||||
That (English) string is now hard-coded in your pattern. As freesewing supports
|
That (English) string is now hard-coded in your pattern. As freesewing supports
|
||||||
translation out of the box, it would be a real shame not to make use of it.
|
translation out of the box, it would be a real shame not to make use of it.
|
||||||
|
|
||||||
Instead, insert a key to identify the string:
|
Instead, insert a key to identify the string:
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
- - -
|
|
||||||
- - -
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<YouTube id='VcQ69_ANsRA' />
|
<YouTube id='VcQ69_ANsRA' />
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,8 @@ De naad waar de buitenstof van de das aan de voering vastzit zit niet aan de ran
|
||||||
|
|
||||||
Bevestig tussenvoering punt (deel 1) aan tussenvoering staart (deel 2) aan elkaar aan de niet-puntige kant. Let op dat de merktekens overeenkomen.
|
Bevestig tussenvoering punt (deel 1) aan tussenvoering staart (deel 2) aan elkaar aan de niet-puntige kant. Let op dat de merktekens overeenkomen.
|
||||||
|
|
||||||
> **Of niet** <br /> Om eerlijk te zijn stik ik de tussenvoering nooit aan elkaar. Ik laat de twee helften gewoon los.
|
> **Of niet**
|
||||||
|
> Om eerlijk te zijn stik ik de tussenvoering nooit aan elkaar. Ik laat de twee helften gewoon los.
|
||||||
>
|
>
|
||||||
> Op deze manier kan de lengte van je das nooit fout zijn, en kan je de stukken tussenvoering gewoon over elkaar heen schuiven. Daarnaast zorgt het voor minder bulk in het midden en is het minder werk.
|
> Op deze manier kan de lengte van je das nooit fout zijn, en kan je de stukken tussenvoering gewoon over elkaar heen schuiven. Daarnaast zorgt het voor minder bulk in het midden en is het minder werk.
|
||||||
>
|
>
|
||||||
|
|
|
@ -4,8 +4,12 @@ title: Knöpfe, Knopflöcher und Druckknöpfe
|
||||||
|
|
||||||
Buttons and buttonholes may come in different sizes, but always have the same shape that represents how they look in real life:
|
Buttons and buttonholes may come in different sizes, but always have the same shape that represents how they look in real life:
|
||||||
|
|
||||||
<Legend part="buttons" caption="A button is shown on the left, and a buttonhole on the right" >
|
<Legend part="buttons">
|
||||||
|
A button is shown on the left, and a buttonhole on the right
|
||||||
|
</Legend>
|
||||||
|
|
||||||
Snaps haben einen *-Stud* und *Sockel* Teil und sehen auch wie das echte aus:
|
Snaps haben einen *-Stud* und *Sockel* Teil und sehen auch wie das echte aus:
|
||||||
|
|
||||||
<Legend part="snaps" caption="A snap stud is shown on the left, and a snap socket on the right" >
|
<Legend part="snaps">
|
||||||
|
A snap stud is shown on the left, and a snap socket on the right
|
||||||
|
</Legend>
|
||||||
|
|
|
@ -4,8 +4,12 @@ title: Botones, agujeros de botones y tapones
|
||||||
|
|
||||||
Buttons and buttonholes may come in different sizes, but always have the same shape that represents how they look in real life:
|
Buttons and buttonholes may come in different sizes, but always have the same shape that represents how they look in real life:
|
||||||
|
|
||||||
<Legend part="buttons" caption="A button is shown on the left, and a buttonhole on the right" >
|
<Legend part="buttons">
|
||||||
|
A button is shown on the left, and a buttonhole on the right
|
||||||
|
</Legend>
|
||||||
|
|
||||||
Las tomas tienen una parte del socket ** y *del stud* y también se ven como lo real:
|
Las tomas tienen una parte del socket ** y *del stud* y también se ven como lo real:
|
||||||
|
|
||||||
<Legend part="snaps" caption="A snap stud is shown on the left, and a snap socket on the right" >
|
<Legend part="snaps">
|
||||||
|
A snap stud is shown on the left, and a snap socket on the right
|
||||||
|
</Legend>
|
||||||
|
|
|
@ -5,6 +5,8 @@ title: Boutons, boutonnières, et boutons pressions
|
||||||
Les boutons et boutonnières peuvent avoir des tailles différentes, mais ont toujours la même forme que celle à quoi ils ressemblent dans la vie réelle :
|
Les boutons et boutonnières peuvent avoir des tailles différentes, mais ont toujours la même forme que celle à quoi ils ressemblent dans la vie réelle :
|
||||||
|
|
||||||
<Legend part="buttons">
|
<Legend part="buttons">
|
||||||
|
A button is shown on the left, and a buttonhole on the right
|
||||||
|
</Legend>
|
||||||
|
|
||||||
A button is shown on the left, and a buttonhole on the right
|
A button is shown on the left, and a buttonhole on the right
|
||||||
|
|
||||||
|
@ -18,3 +20,6 @@ A snap stud is shown on the left, and a snap socket on the right
|
||||||
|
|
||||||
</Legend>
|
</Legend>
|
||||||
|
|
||||||
|
<Legend part="snaps">
|
||||||
|
A snap stud is shown on the left, and a snap socket on the right
|
||||||
|
</Legend>
|
||||||
|
|
|
@ -4,8 +4,12 @@ title: Knopen, knoopsgaten en en drukknopen
|
||||||
|
|
||||||
Knoppen en knoopsgaten kunnen in verschillende maten komen, maar hebben altijd dezelfde vorm die geeft hoe ze er in het echte leven uitzien:
|
Knoppen en knoopsgaten kunnen in verschillende maten komen, maar hebben altijd dezelfde vorm die geeft hoe ze er in het echte leven uitzien:
|
||||||
|
|
||||||
<Legend part="buttons" caption="A button is shown on the left, and a buttonhole on the right" >
|
<Legend part="buttons">
|
||||||
|
A button is shown on the left, and a buttonhole on the right
|
||||||
|
</Legend>
|
||||||
|
|
||||||
Drukknopen hebben een *bol* en een *hol*deel, en zien er ook uit zoals in het echt:
|
Drukknopen hebben een *bol* en een *hol*deel, en zien er ook uit zoals in het echt:
|
||||||
|
|
||||||
<Legend part="snaps" caption="A snap stud is shown on the left, and a snap socket on the right" >
|
<Legend part="snaps">
|
||||||
|
A snap stud is shown on the left, and a snap socket on the right
|
||||||
|
</Legend>
|
||||||
|
|
|
@ -6,9 +6,13 @@ Die Designer können, wenn sie dies wünschen, die Standardlinienbreite übersch
|
||||||
|
|
||||||
Hier sind die verschiedenen verfügbaren Linienbreiten:
|
Hier sind die verschiedenen verfügbaren Linienbreiten:
|
||||||
|
|
||||||
<Legend part="lineWidths" caption="The different line widths" >
|
<Legend part="lineWidths">
|
||||||
|
The different line widths
|
||||||
|
</Legend>
|
||||||
|
|
||||||
Und das sind die verschiedenen Strichstile:
|
Und das sind die verschiedenen Strichstile:
|
||||||
|
|
||||||
<Legend part="lineStrokes" caption="The different line strokes" >
|
<Legend part="lineStrokes">
|
||||||
|
The different line strokes
|
||||||
|
</Legend>
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,13 @@ Los diseñadores pueden, si lo eligen, sobreescribir el ancho de línea por defe
|
||||||
|
|
||||||
Para referencia, aquí están los diferentes anchos de línea disponibles:
|
Para referencia, aquí están los diferentes anchos de línea disponibles:
|
||||||
|
|
||||||
<Legend part="lineWidths" caption="The different line widths" >
|
<Legend part="lineWidths">
|
||||||
|
The different line widths
|
||||||
|
</Legend>
|
||||||
|
|
||||||
Y estos son los diferentes estilos de trazo:
|
Y estos son los diferentes estilos de trazo:
|
||||||
|
|
||||||
<Legend part="lineStrokes" caption="The different line strokes" >
|
<Legend part="lineStrokes">
|
||||||
|
The different line strokes
|
||||||
|
</Legend>
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,13 @@ Les concepteurs peuvent, s'ils le souhaitent, utiliser les épaisseurs de lignes
|
||||||
|
|
||||||
Pour référence, voici les différentes épaisseurs de lignes disponibles :
|
Pour référence, voici les différentes épaisseurs de lignes disponibles :
|
||||||
|
|
||||||
<Legend part="lineWidths" caption="The different line widths" >
|
<Legend part="lineWidths">
|
||||||
|
The different line widths
|
||||||
|
</Legend>
|
||||||
|
|
||||||
Et ici sont les différents styles de trait :
|
Et ici sont les différents styles de trait :
|
||||||
|
|
||||||
<Legend part="lineStrokes" caption="The different line strokes" >
|
<Legend part="lineStrokes">
|
||||||
|
The different line strokes
|
||||||
|
</Legend>
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,13 @@ Ontwerpers kunnen, als ze willen, een andere lijndikte of vorm van lijn kiezen d
|
||||||
|
|
||||||
Ter referentie zijn hier de verschillende beschikbare lijndiktes:
|
Ter referentie zijn hier de verschillende beschikbare lijndiktes:
|
||||||
|
|
||||||
<Legend part="lineWidths" caption="The different line widths" >
|
<Legend part="lineWidths">
|
||||||
|
The different line widths
|
||||||
|
</Legend>
|
||||||
|
|
||||||
En dit zijn de verschillende types lijnen:
|
En dit zijn de verschillende types lijnen:
|
||||||
|
|
||||||
<Legend part="lineStrokes" caption="The different line strokes" >
|
<Legend part="lineStrokes">
|
||||||
|
The different line strokes
|
||||||
|
</Legend>
|
||||||
|
|
||||||
|
|
10
package.json
10
package.json
|
@ -29,7 +29,9 @@
|
||||||
"contributors:add": "all-contributors add",
|
"contributors:add": "all-contributors add",
|
||||||
"contributors:generate": "all-contributors generate",
|
"contributors:generate": "all-contributors generate",
|
||||||
"famadd": "all-contributors add",
|
"famadd": "all-contributors add",
|
||||||
"famgen": "all-contributors generate"
|
"famgen": "all-contributors generate",
|
||||||
|
"checkdocs": "remark ./markdown/dev/guides/best-practices/ --quiet --frail",
|
||||||
|
"fixdocs": "remark ./markdown/dev/guides/best-practices/ --quiet --frail --output"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -129,6 +131,12 @@
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"jsonfile": "^6.1.0",
|
"jsonfile": "^6.1.0",
|
||||||
"postcss": "^8.4.5",
|
"postcss": "^8.4.5",
|
||||||
|
"remark-cli": "^10.0.1",
|
||||||
|
"remark-frontmatter": "^4.0.1",
|
||||||
|
"remark-lint-emphasis-marker": "^3.1.1",
|
||||||
|
"remark-lint-list-item-indent": "^3.1.1",
|
||||||
|
"remark-preset-lint-consistent": "^5.1.1",
|
||||||
|
"remark-preset-lint-recommended": "^6.1.2",
|
||||||
"tailwindcss": "^3.0.7"
|
"tailwindcss": "^3.0.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,16 +21,17 @@
|
||||||
],
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"create-freesewing-pattern: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
"test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.mjs",
|
||||||
"pubtest": "npm publish --registry http://localhost:6662",
|
"pubtest": "npm publish --registry http://localhost:6662",
|
||||||
"pubforce": "npm publish",
|
"pubforce": "npm publish",
|
||||||
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
|
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
|
||||||
"start": "rollup -c -w"
|
"start": "rollup -c -w",
|
||||||
|
"testci": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.mjs"
|
||||||
},
|
},
|
||||||
"peerDependencies": {},
|
"peerDependencies": {},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^4.1.1",
|
"chalk": "^4.1.1",
|
||||||
"commander": "^8.1.0",
|
"commander": "^9.0.0",
|
||||||
"conf": "^10.0.1",
|
"conf": "^10.0.1",
|
||||||
"cp-file": "^9.0.0",
|
"cp-file": "^9.0.0",
|
||||||
"execa": "^5.1.0",
|
"execa": "^5.1.0",
|
||||||
|
|
17
packages/create-freesewing-pattern/tests/cli.test.mjs
Normal file
17
packages/create-freesewing-pattern/tests/cli.test.mjs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import chai from 'chai'
|
||||||
|
import { spawnSync } from 'child_process'
|
||||||
|
|
||||||
|
describe('CLI help', () => {
|
||||||
|
it("Should run successfully", () => {
|
||||||
|
const result = spawnSync('node', ['./lib/cli.js', '-h'])
|
||||||
|
if (result.status != 0) {
|
||||||
|
console.log('Command failed: node ./lib/cli.js -h');
|
||||||
|
console.log('status: ' + result.status);
|
||||||
|
console.log('stdout:')
|
||||||
|
console.log(result.stdout.toString('utf8'));
|
||||||
|
console.log('stderr:')
|
||||||
|
console.log(result.stderr.toString('utf8'));
|
||||||
|
chai.assert.fail();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
Loading…
Add table
Add a link
Reference in a new issue