1
0
Fork 0
freesewing/packages/plugin-bundle/README.md

77 lines
3.4 KiB
Markdown
Raw Normal View History

2018-08-11 12:41:00 +02:00
<p align="center">
<a title="Go to freesewing.org" href="https://freesewing.org/"><img src="https://freesewing.org/img/logo/black.svg" align="center" width="150px" alt="Freesewing logo"/></a>
</p>
<h4 align="center"><em>&nbsp;<a title="Go to freesewing.org" href="https://freesewing.org/">freesewing</a></em>
<br><sup>a library for made-to-measure sewing patterns</sup>
</h4>
2018-08-20 14:11:28 +02:00
<p align="center">
<a href="https://travis-ci.org/freesewing/plugin-bundle"><img src="https://badgen.net/travis/freesewing/plugin-bundle/master" alt="Travis build"></a>
2018-08-20 14:14:31 +02:00
<a href="https://www.npmjs.com/package/@freesewing/plugin-bundle"><img src="https://badgen.net/npm/v/@freesewing/plugin-bundle" alt="Version"></a>
<a href="https://www.npmjs.com/package/@freesewing/plugin-bundle"><img src="https://badgen.net/npm/license/@freesewing/plugin-bundle" alt="License"></a>
<a href="https://codecov.io/gh/freesewing/plugin-bundle"><img src="https://badgen.net/codecov/c/github/freesewing/plugin-bundle/master" alt="Code coverage"></a>
<a href="https://deepscan.io/dashboard#view=project&pid=3253&bid=27563"><img src="https://deepscan.io/api/projects/3253/branches/27563/badge/grade.svg" alt="DeepScan grade"></a>
2018-08-20 14:11:28 +02:00
<a href="https://gitter.im/freesewing/freesewing"><img src="https://badgen.net/badge/chat/on%20Gitter/cyan" alt="Chat on Gitter"></a>
<a href="https://freesewing.org/patrons/join"><img src="https://badgen.net/badge/become/a%20Patron/FF5B77" alt="Become a Patron"></a>
</p>
2018-08-11 12:41:00 +02:00
2018-08-11 12:36:45 +02:00
# plugin-bundle
2018-08-11 12:41:00 +02:00
A freesewing plugin that provides the following plugins in one bundle:
1) [plugin-cutonfold](https://github.com/freesewing/plugin-cutonfold) : Add cut-on-fold indicators to your patterns
2) [plugin-dimension](https://github.com/freesewing/plugin-dimension) : Add dimensions to your (paperless) patterns
3) [plugin-grainline](https://github.com/freesewing/plugin-grainline) : Add grainline indicators to your patterns
2018-08-20 14:17:19 +02:00
4) [plugin-logo](https://github.com/freesewing/plugin-logo) : Add a scalebox to your patterns
5) [plugin-scalebox](https://github.com/freesewing/plugin-scalebox) : Add pretty titles to your pattern parts
6) [plugin-title](https://github.com/freesewing/plugin-title) : Add pretty titles to your pattern parts
7) [plugin-round](https://github.com/freesewing/plugin-title) : Rounds corners
8) [plugin-sprinkle](https://github.com/freesewing/plugin-sprinkle) : Add multiple snippets to your pattern
2018-08-11 13:50:46 +02:00
Note that these are all **build-time plugins**. In other words, plugins used by developers/pattern designers,
rather than run-time plugins that are used when generating patterns.
2018-08-20 14:17:19 +02:00
Without exception, all freesewing patterns use all these plugins, so it made sense to bundle them.
2018-08-11 13:50:46 +02:00
2018-08-11 12:41:00 +02:00
## Usage
To load this plugin, add it to your instantiated pattern.
On node.js:
```js
2018-08-20 14:17:19 +02:00
import freesewing from 'freesewing'
2018-08-11 12:41:00 +02:00
import pluginBundle from '@freesewing/plugin-bundle'
2018-08-20 14:17:19 +02:00
let pattern = new freesewing.Pattern()
.with(pluginBundle);
2018-08-11 12:41:00 +02:00
```
In the browser, this plugin will register as `freesewing.plugins.bundle`:
```html
<script type="text/javascript" src="https://unpkg.com/freesewing"></script>
<script type="text/javascript" src="https://unpkg.com/@freesewing/plugin-bundle"></script>
<script>
2018-08-20 14:17:19 +02:00
var pattern = new freesewing.Pattern()
2018-08-11 12:41:00 +02:00
.with(freesewing.plugins.bundle);
</script>
```
## Install
To install, run:
```sh
npm install @freesewing/plugin-bundle
```
## Build
To build this plugin, run:
```sh
npm run build
```