.. | ||
src | ||
.editorconfig | ||
.gitignore | ||
.npmignore | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
rollup.js |
freesewing
a library for made-to-measure sewing patterns
plugin-validate
A freesewing plugin that checks whether all required measurements are set prior to drafting your pattern.
If a measurement is missing, this will throw an exception, and tell you which measurement is missing.
Usage
To load this plugin, add it to your instantiated pattern.
On node.js:
import pattern from '@freesewing/pattern-brian'
import validate from '@freesewing/plugin-validate'
pattern.with(validate);
In the browser, this plugin will register as freesewing.plugins.validate
:
<script type="text/javascript" src="https://unpkg.com/freesewing"></script>
<script type="text/javascript" src="https://unpkg.com/@freesewing/plugin-validate"></script>
<script type="text/javascript" src="https://unpkg.com/@freesewing/pattern-brian"></script>
<script>
var pattern = freesewing.patterns.brian
.with(freesewing.plugins.validate);
</script>
Install
To install, run:
npm install @freesewing/plugin-validate
Build
To build this plugin, run:
npm run build
License: MIT
See the license file for details.