breaking(config-helpers): Is now (again) the snapseries package
This commit is contained in:
parent
bbfef41e98
commit
364e43b635
9 changed files with 43 additions and 59 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -9,6 +9,7 @@
|
|||
|
||||
- The `@freesewing/components` package is not part of FreeSewing v3. While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/css-theme` package is not part of FreeSewing v3. While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/config-helpers` package is not part of FreeSewing v3. While v2 versions remain available, this package is no longer supported. Use the `@freesewing/snapseries` package for various helpers for snapped percentage options. The `pctBasedOn` helper method is now available as a named export from `@freesewing/core`
|
||||
- The `@freesewing/i18n` package is not part of FreeSewing v3. While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/mui-theme` package is not part of FreeSewing v3. While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/pattern-info` package is not part of FreeSewing v3. While v2 versions remain available, this package is no longer supported.
|
||||
|
@ -840,12 +841,6 @@
|
|||
|
||||
- Migrated from Rollup to Esbuild for all builds
|
||||
|
||||
### config-helpers
|
||||
|
||||
#### Added
|
||||
|
||||
- This new package replaces the previous snapseries package and adds extra helper methods for pattern config such as `pctBasedOn()` which was previously exported by core
|
||||
|
||||
### core
|
||||
|
||||
#### Changed
|
||||
|
@ -1922,6 +1917,12 @@
|
|||
- This is a plugin to strip (FreeSewing) versdion info out of the SVG to allow you to diff your SVG output between FreeSewing versions
|
||||
- Initial release
|
||||
|
||||
### snapseries
|
||||
|
||||
#### Added
|
||||
|
||||
- Initial release of `@freesewing/snapseries` wich holds commonly used series of snap values for percentage options
|
||||
|
||||
### core
|
||||
|
||||
#### Added
|
||||
|
|
|
@ -14,6 +14,10 @@ Unreleased:
|
|||
While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/css-theme` package is not part of FreeSewing v3.
|
||||
While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/config-helpers` package is not part of FreeSewing v3.
|
||||
While v2 versions remain available, this package is no longer supported.
|
||||
Use the `@freesewing/snapseries` package for various helpers for snapped percentage options.
|
||||
The `pctBasedOn` helper method is now available as a named export from `@freesewing/core`
|
||||
- The `@freesewing/i18n` package is not part of FreeSewing v3.
|
||||
While v2 versions remain available, this package is no longer supported.
|
||||
- The `@freesewing/mui-theme` package is not part of FreeSewing v3.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"config-helpers": "A FreeSewing package to facilitate pattern configurations",
|
||||
"snapseries": "A FreeSewing package to facilitate snapped percentage options in designs",
|
||||
"core": "A library for creating made-to-measure sewing patterns",
|
||||
"i18n": "Translations for the FreeSewing project",
|
||||
"models": "Body measurements data for a range of default sizes",
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# Change log for: @freesewing/config-helpers
|
||||
|
||||
|
||||
## 2.21.0 (2022-06-27)
|
||||
|
||||
### Added
|
||||
|
||||
- This new package replaces the previous snapseries package and adds extra helper methods for pattern config such as `pctBasedOn()` which was previously exported by core
|
||||
|
||||
|
||||
This is the **initial release**, and the start of this change log.
|
||||
|
||||
> Prior to version 2, FreeSewing was not a JavaScript project.
|
||||
> As such, that history is out of scope for this change log.
|
||||
|
15
packages/snapseries/CHANGELOG.md
Normal file
15
packages/snapseries/CHANGELOG.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Change log for: @freesewing/snapseries
|
||||
|
||||
|
||||
## 2.19.0 (2021-10-17)
|
||||
|
||||
### Added
|
||||
|
||||
- Initial release of `@freesewing/snapseries` wich holds commonly used series of snap values for percentage options
|
||||
|
||||
|
||||
This is the **initial release**, and the start of this change log.
|
||||
|
||||
> Prior to version 2, FreeSewing was not a JavaScript project.
|
||||
> As such, that history is out of scope for this change log.
|
||||
|
|
@ -1,13 +1,13 @@
|
|||

|
||||
<p align='center'><a
|
||||
href="https://www.npmjs.com/package/@freesewing/config-helpers"
|
||||
title="@freesewing/config-helpers on NPM"
|
||||
><img src="https://img.shields.io/npm/v/@freesewing/config-helpers.svg"
|
||||
alt="@freesewing/config-helpers on NPM"/>
|
||||
href="https://www.npmjs.com/package/@freesewing/snapseries"
|
||||
title="@freesewing/snapseries on NPM"
|
||||
><img src="https://img.shields.io/npm/v/@freesewing/snapseries.svg"
|
||||
alt="@freesewing/snapseries on NPM"/>
|
||||
</a><a
|
||||
href="https://opensource.org/licenses/MIT"
|
||||
title="License: MIT"
|
||||
><img src="https://img.shields.io/npm/l/@freesewing/config-helpers.svg?label=License"
|
||||
><img src="https://img.shields.io/npm/l/@freesewing/snapseries.svg?label=License"
|
||||
alt="License: MIT"/>
|
||||
</a><a
|
||||
href="https://deepscan.io/dashboard#view=project&tid=2114&pid=2993&bid=23256"
|
||||
|
@ -15,10 +15,10 @@
|
|||
><img src="https://deepscan.io/api/teams/2114/projects/2993/branches/23256/badge/grade.svg"
|
||||
alt="Code quality on DeepScan"/>
|
||||
</a><a
|
||||
href="https://github.com/freesewing/freesewing/issues?q=is%3Aissue+is%3Aopen+label%3Apkg%3Aconfig-helpers"
|
||||
title="Open issues tagged pkg:config-helpers"
|
||||
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:config-helpers.svg?label=Issues"
|
||||
alt="Open issues tagged pkg:config-helpers"/>
|
||||
href="https://github.com/freesewing/freesewing/issues?q=is%3Aissue+is%3Aopen+label%3Apkg%3Asnapseries"
|
||||
title="Open issues tagged pkg:snapseries"
|
||||
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:snapseries.svg?label=Issues"
|
||||
alt="Open issues tagged pkg:snapseries"/>
|
||||
</a><a
|
||||
href="#contributors-"
|
||||
title="All Contributors"
|
||||
|
@ -46,9 +46,9 @@
|
|||
alt="Follow @freesewing_org on Twitter"/>
|
||||
</a></p>
|
||||
|
||||
# @freesewing/config-helpers
|
||||
# @freesewing/snapseries
|
||||
|
||||
A FreeSewing package to facilitate pattern configurations
|
||||
A FreeSewing package to facilitate snapped percentage options in designs
|
||||
|
||||
|
||||
|
||||
|
@ -63,7 +63,7 @@ A FreeSewing package to facilitate pattern configurations
|
|||
|
||||
This repository is our *monorepo* holding all our NPM designs, plugins, other NPM packages, and (web)sites.
|
||||
|
||||
This folder holds: @freesewing/config-helpers
|
||||
This folder holds: @freesewing/snapseries
|
||||
|
||||
If you're not entirely sure what to do or how to start, type this command:
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@freesewing/config-helpers",
|
||||
"name": "@freesewing/snapseries",
|
||||
"version": "3.0.0-alpha.0",
|
||||
"description": "A FreeSewing package to facilitate pattern configurations",
|
||||
"description": "A FreeSewing package to facilitate snapped percentage options in designs",
|
||||
"author": "Joost De Cock <joost@joost.at> (https://github.com/joostdecock)",
|
||||
"homepage": "https://freesewing.org/",
|
||||
"repository": "github:freesewing/freesewing",
|
||||
|
@ -27,11 +27,11 @@
|
|||
"clean": "rimraf dist",
|
||||
"mbuild": "NO_MINIFY=1 node --experimental-json-modules build.mjs",
|
||||
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
|
||||
"test": "echo \"config-helpers: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
||||
"test": "echo \"snapseries: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
||||
"vbuild": "VERBOSE=1 node --experimental-json-modules build.mjs",
|
||||
"lab": "cd ../../sites/lab && yarn start",
|
||||
"tips": "node ../../scripts/help.mjs",
|
||||
"cibuild_step0": "node --experimental-json-modules build.mjs"
|
||||
"cibuild_step6": "node --experimental-json-modules build.mjs"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"dependencies": {},
|
|
@ -1,8 +1,3 @@
|
|||
|
||||
/*
|
||||
* Snap series
|
||||
* ==============================
|
||||
*/
|
||||
// Common width for elastics
|
||||
export const elastics = {
|
||||
metric: [3.5, 5, 10, 12, 20, 25, 30, 40, 50, 60, 80, 100, 120],
|
||||
|
@ -38,21 +33,6 @@ export const bigsteps = {
|
|||
imperial: 12.7, // 1/2 inch
|
||||
}
|
||||
|
||||
/*
|
||||
* Config helper methods
|
||||
* ==============================
|
||||
*/
|
||||
export function pctBasedOn(measurement) {
|
||||
return {
|
||||
toAbs: (val, { measurements }) => measurements?.[measurement]
|
||||
? measurements[measurement] * val
|
||||
: null,
|
||||
fromAbs: (val, { measurements }) => measurements?.[measurement]
|
||||
? Math.round((10 * val) / measurements[measurement]) / 10
|
||||
: null
|
||||
}
|
||||
}
|
||||
|
||||
// Default export
|
||||
export default {
|
||||
elastics,
|
||||
|
@ -60,5 +40,4 @@ export default {
|
|||
smallsteps,
|
||||
steps,
|
||||
bigsteps,
|
||||
pctBasedOn,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue