diff --git a/packages/plugin-title/README.md b/packages/plugin-title/README.md index 70dd8e05962..cf20309f052 100644 --- a/packages/plugin-title/README.md +++ b/packages/plugin-title/README.md @@ -5,51 +5,62 @@
a library for made-to-measure sewing patterns -# freesewing / plugins / macro-title +# plugin-title -This is a macro for [freesewing](https://github.com/freesewing/freesewing) -to add a title to your pattern part. +A freesewing plugin to add pretty part titles to your pattern. -## Install +## Usage -```sh -npm install @freesewing-plugins/macro-title --save -``` +To load this plugin, add it to your instantiated pattern. -## Loading the plugin - -Plugins are loaded by the `withPlugin` method of an instantiated freesewing pattern: +On node.js: ```js -import F from 'freesewing'; -import partTitle from '@freesewing-plugins/macro-title'; +import pattern from '@freesewing/pattern-brian' +import title from '@freesewing/plugin-theme' +import title from '@freesewing/plugin-title' -var pattern = new F.pattern() - .withPlugin(partTitle); +pattern..with(theme).with(title); ``` -## Using the plugin +In the browser, this plugin will register as `freesewing.plugins.title`: -This plugin provides the `title` macro which you can call with the `macro` method on an instantiated pattern part: +```html + + + + -```js -part.macro('title', { - at: points.titleAnchor -, nr: 2 -, name: 'backBlock' -, pattern: 'brian' -}); + ``` -### Parameters - - - `at`: A point object to anchor the title on - - `nr`: The part number - - `name`: The part name - - `pattern`: The name of the pattern - -As all freesewing macros, bundle these parameters into a single object. - ## Example -FIXME: include example +This plugin styles a title like this: + +![Example of the title inserted by this plugin](https://github.com/freesewing/plugin-title/raw/master/img/example.png) + +## Install + +To install, run: + +```sh +npm install @freesewing/plugin-title +``` + +## Build + +To build this plugin, run: + +```sh +npm run build +``` + +## License: MIT + +See [the license file](https://github.com/freesewing/plugin-theme/blob/master/LICENSE) +for details.