diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e2b60d6918..45a13015a59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,27 @@ ## Unreleased +### components + +#### Added + + - Added some more examples to the Examples component + +#### Fixed + + - Include basic themeing in Example component + +### css-theme + +#### Added + + - Proper formatting for markdown syntax highlighting + ### shin #### Fixed - - Removed the unused `lengthBonus` options. Closes [#752](https://github.com/freesewing/freesewing/issues/752) + - Removed unused lengthBonus option ## 2.10.7 (2020-11-18) diff --git a/config/changelog.yaml b/config/changelog.yaml index 494fe9add47..a9658095252 100644 --- a/config/changelog.yaml +++ b/config/changelog.yaml @@ -5,6 +5,9 @@ Unreleased: - Added some more examples to the Examples component css-theme: - Proper formatting for markdown syntax highlighting + plugin-notches: + - Initial release. See [#757](https://github.com/freesewing/freesewing/issues/757) + Changed: Fixed: components: diff --git a/config/descriptions.yaml b/config/descriptions.yaml index 2248dc2d4b9..8c140c81f7b 100644 --- a/config/descriptions.yaml +++ b/config/descriptions.yaml @@ -32,7 +32,7 @@ penelope: 'A FreeSewing pattern for a pencil skirt' plugin-banner: 'A FreeSewing plugin to repeat text on a path' plugin-bundle: 'An umbrella package of 8 essential FreeSewing build-time plugins' plugin-bust: 'A FreeSewing plugin that helps with bust-adjusting menswear patterns' -plugin-buttons: 'A FreeSewing plugin that provides button and buttonhole snippets' +plugin-buttons: 'A FreeSewing plugin that provides button, buttonhole, and snap snippets' plugin-cutonfold: 'A FreeSewing plugin to add cut-on-fold indicators on your patterns' plugin-dimension: 'A FreeSewing plugin to add dimensions to your (paperless) pattern' plugin-export-dxf: 'A FreeSewing plugin to export your pattern as DXF-ASTM' @@ -43,6 +43,7 @@ plugin-i18n: 'A FreeSewing plugin for pattern translation' plugin-logo: 'A FreeSewing plugin to add our logo to your patterns' plugin-measurements: 'A FreeSewing plugin that adds additional measurements that can be calculated from existing ones' plugin-mirror: 'A FreeSewing plugin to mirror points or paths' +plugin-notches: 'A FreeSewing plugin that provides front and back notch snippets' plugin-round: 'A FreeSewing plugin to round corners' plugin-scalebox: 'A FreeSewing plugin to add a scalebox to your pattern' plugin-sprinkle: 'A FreeSewing plugin to bulk-add snippets to your pattern' diff --git a/packages/plugin-bundle/src/index.js b/packages/plugin-bundle/src/index.js index 79b78212b14..90f2a20b2a6 100644 --- a/packages/plugin-bundle/src/index.js +++ b/packages/plugin-bundle/src/index.js @@ -3,6 +3,7 @@ import cutonfold from '@freesewing/plugin-cutonfold' import dimension from '@freesewing/plugin-dimension' import grainline from '@freesewing/plugin-grainline' import logo from '@freesewing/plugin-logo' +import notches from '@freesewing/plugin-notches' import title from '@freesewing/plugin-title' import scalebox from '@freesewing/plugin-scalebox' import round from '@freesewing/plugin-round' @@ -10,7 +11,18 @@ import sprinkle from '@freesewing/plugin-sprinkle' import measurements from '@freesewing/plugin-measurements' import { version, name } from '../package.json' -let bundle = [cutonfold, dimension, grainline, logo, title, scalebox, round, sprinkle, measurements] +let bundle = [ + cutonfold, + dimension, + grainline, + logo, + notches, + title, + scalebox, + round, + sprinkle, + measurements +] function bundleHooks() { let hooks = {} diff --git a/packages/plugin-buttons/README.md b/packages/plugin-buttons/README.md index 347724ede61..26c1c6603fa 100644 --- a/packages/plugin-buttons/README.md +++ b/packages/plugin-buttons/README.md @@ -46,7 +46,7 @@ This repository is our *monorepo* holding [all our NPM packages](https://www.npmjs.com/search?q=keywords:freesewing). This folder holds **@freesewing/plugin-buttons** -A FreeSewing plugin that provides button and buttonhole snippets +A FreeSewing plugin that provides button, buttonhole, and snap snippets diff --git a/packages/plugin-buttons/package.json b/packages/plugin-buttons/package.json index 7686baddfd7..7983f5f1226 100644 --- a/packages/plugin-buttons/package.json +++ b/packages/plugin-buttons/package.json @@ -1,7 +1,7 @@ { "name": "@freesewing/plugin-buttons", "version": "2.10.8-rc.0", - "description": "A FreeSewing plugin that provides button and buttonhole snippets", + "description": "A FreeSewing plugin that provides button, buttonhole, and snap snippets", "author": "Joost De Cock (https://github.com/joostdecock)", "homepage": "https://freesewing.org/", "repository": "github:freesewing/freesewing", diff --git a/packages/plugin-notches/CHANGELOG.md b/packages/plugin-notches/CHANGELOG.md new file mode 100644 index 00000000000..3e74153211c --- /dev/null +++ b/packages/plugin-notches/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change log for: @freesewing/plugin-notches + + + +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. + diff --git a/packages/plugin-notches/README.md b/packages/plugin-notches/README.md new file mode 100644 index 00000000000..bbe591a9325 --- /dev/null +++ b/packages/plugin-notches/README.md @@ -0,0 +1,100 @@ +![FreeSewing](https://freesewing.org/banner.jpg) +

@freesewing/plugin-notches on NPM + License: MIT + Code quality on DeepScan + Open issues tagged pkg:plugin-notches +

Follow @freesewing_org on Twitter + Chat with us on Discord + Become a FreeSewing Patron + Follow @freesewing_org on Twitter +

+ +## What am I looking at? 🤔 + +This repository is our *monorepo* holding [all our NPM packages](https://www.npmjs.com/search?q=keywords:freesewing). +This folder holds **@freesewing/plugin-notches** + +A FreeSewing plugin that provides front and back notch snippets + + + +## About FreeSewing 💀 + +Where the world of makers and developers collide, that's where you'll find FreeSewing. + +Our [core library](https://freesewing.dev/reference/api/) is a *batteries-included* toolbox +for parametric design of sewing patterns. It's a modular system (check our list +of [plugins](https://freesewing.dev/reference/plugins/) and getting started is as simple as: + +```bash +npm init freesewing-pattern +``` + +The [getting started](https://freesewing.dev/guides/getting-started/) section on [freesewing.dev](https://freesewing.dev/) is a good +entrypoint to our documentation, but you'll find a lot more there, including +our [API reference](https://freesewing.dev/reference/api/), +as well as [our turorial](https://freesewing.dev/tutorials/pattern-design/), +and [howtos](https://freesewing.dev/howtos/). + +If you're a maker, checkout [freesewing.org](https://freesewing/) where you can generate +our sewing patterns adapted to your measurements. + +## Support FreeSewing: Become a patron 🥰 + +FreeSewing is an open source project run by a community, +and financially supported by our patrons. + +If you feel what we do is worthwhile, you too +should [become a patron](https://freesewing.org/patrons/join). + +## Links 👩‍💻 + + - 💻 Makers website: [freesewing.org](https://freesewing.org) + - 💻 Developers website: [freesewing.dev](https://freesewing.dev) + - 💬 Chat: On Discord via [chat.freesewing.org](https://chat.freesewing.org/) + - 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org) + - 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org) + +## License: MIT 🤓 + +© [Joost De Cock](https://github.com/joostdecock). +See [the license file](https://github.com/freesewing/freesewing/blob/develop/LICENSE) for details. + +## Where to get help 🤯 + +Our [chatrooms on Discord](https://chat.freesewing.org/) are the best place to ask questions, +share your feedback, or just hang out. + +If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new). diff --git a/packages/plugin-notches/package.json b/packages/plugin-notches/package.json new file mode 100644 index 00000000000..8a3df36fcc1 --- /dev/null +++ b/packages/plugin-notches/package.json @@ -0,0 +1,55 @@ +{ + "name": "@freesewing/plugin-notches", + "version": "2.10.8-rc.0", + "description": "A FreeSewing plugin that provides front and back notch snippets", + "author": "Joost De Cock (https://github.com/joostdecock)", + "homepage": "https://freesewing.org/", + "repository": "github:freesewing/freesewing", + "license": "MIT", + "bugs": { + "url": "https://github.com/freesewing/freesewing/issues" + }, + "keywords": [ + "freesewing", + "plugin", + "sewing pattern", + "sewing", + "design", + "parametric design", + "made to measure", + "diy", + "fashion" + ], + "main": "dist/index.js", + "module": "dist/index.mjs", + "scripts": { + "clean": "rimraf dist", + "build": "rollup -c", + "test": "echo \"plugin-notches: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "pubtest": "npm publish --registry http://localhost:6662", + "pubforce": "npm publish", + "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", + "start": "rollup -c -w" + }, + "peerDependencies": { + "@freesewing/core": "^2.10.8-rc.0" + }, + "dependencies": {}, + "devDependencies": {}, + "files": [ + "dist/*", + "README.md", + "package.json" + ], + "publishConfig": { + "access": "public", + "tag": "next" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6" + }, + "rollup": { + "exports": "default" + } +} diff --git a/packages/plugin-notches/rollup.config.js b/packages/plugin-notches/rollup.config.js new file mode 100644 index 00000000000..a885f4cb4ec --- /dev/null +++ b/packages/plugin-notches/rollup.config.js @@ -0,0 +1,37 @@ +import resolve from '@rollup/plugin-node-resolve' +import commonjs from '@rollup/plugin-commonjs' +import json from '@rollup/plugin-json' +import { terser } from 'rollup-plugin-terser' +import peerDepsExternal from 'rollup-plugin-peer-deps-external' +import { name, version, description, author, license, main, module, rollup } from './package.json' + +const output = [ + { + file: main, + format: 'cjs', + sourcemap: true, + exports: rollup.exports + } +] +if (typeof module !== 'undefined') + output.push({ + file: module, + format: 'es', + sourcemap: true + }) + +export default { + input: 'src/index.js', + output, + plugins: [ + peerDepsExternal(), + resolve({ modulesOnly: true }), + commonjs(), + json(), + terser({ + output: { + preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */` + } + }) + ] +} diff --git a/packages/plugin-notches/src/index.js b/packages/plugin-notches/src/index.js new file mode 100644 index 00000000000..fc4db902b2a --- /dev/null +++ b/packages/plugin-notches/src/index.js @@ -0,0 +1,17 @@ +import { version, name } from '../package.json' + +const notches = + '' + +export default { + name: name, + version: version, + hooks: { + preRender: function (svg) { + if (svg.attributes.get('freesewing:plugin-notches') === false) { + svg.defs += notches + svg.attributes.add('freesewing:plugin-notches', version) + } + } + } +} diff --git a/packages/plugin-theme/src/defs/notch.js b/packages/plugin-theme/src/defs/notch.js deleted file mode 100644 index eff81b6c556..00000000000 --- a/packages/plugin-theme/src/defs/notch.js +++ /dev/null @@ -1 +0,0 @@ -export default ''; diff --git a/packages/plugin-theme/src/index.js b/packages/plugin-theme/src/index.js index 97066c23a1c..3f9746b5511 100644 --- a/packages/plugin-theme/src/index.js +++ b/packages/plugin-theme/src/index.js @@ -1,5 +1,4 @@ import { version, name } from '../package.json' -import notch from './defs/notch' import gridMetric from './defs/grid-metric' import gridImperial from './defs/grid-imperial' import css from './bundle.css.js' @@ -8,10 +7,9 @@ export default { name: name, version: version, hooks: { - preRender: function(svg) { + preRender: function (svg) { if (svg.attributes.get('freesewing:plugin-theme') === false) { svg.attributes.set('class', 'freesewing') - svg.defs += notch svg.style += css if (svg.pattern.settings.paperless) { svg.pattern.settings.units === 'imperial'