From cef12864fa7db039bf3a807e58b6da2570c7f2cd Mon Sep 17 00:00:00 2001 From: joostdecock Date: Fri, 15 Oct 2021 16:21:38 +0200 Subject: [PATCH] chore: Integrating bee --- .github/workflows/tests.bee.yml | 40 +++++++++ CHANGELOG.md | 18 ++++ config/descriptions.yaml | 2 +- config/exceptions.yaml | 2 + packages/bee/CHANGELOG.md | 9 ++ packages/bee/README.md | 118 ++++++++++++++++++++++++++ packages/bee/example/package.json | 2 +- packages/bee/package.json | 93 ++++++++++++++++++++ packages/bee/rollup.config.js | 29 +++++++ packages/bee/tests/shared.test.js | 39 +++++++++ packages/holmes/CHANGELOG.md | 18 ++++ packages/pattern-info/src/index.js | 3 +- packages/pattern-info/src/prebuild.js | 2 + 13 files changed, 372 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/tests.bee.yml create mode 100644 packages/bee/CHANGELOG.md create mode 100644 packages/bee/README.md create mode 100644 packages/bee/package.json create mode 100644 packages/bee/rollup.config.js create mode 100644 packages/bee/tests/shared.test.js diff --git a/.github/workflows/tests.bee.yml b/.github/workflows/tests.bee.yml new file mode 100644 index 00000000000..5e7065d11f4 --- /dev/null +++ b/.github/workflows/tests.bee.yml @@ -0,0 +1,40 @@ +name: Unit tests - Bee + +on: + push: + branches: + - develop + - main + pull_request: + branches: + - develop + - main + +jobs: + test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: cd packages/bee && npm install + env: + CI: true + - name: Install peer & test dependencies + run: "cd packages/bee && npm install @freesewing/core@^2.19.0-alpha.1 @freesewing/plugin-bundle@^2.19.0-alpha.1 @freesewing/models@2.19.0-alpha.1 @freesewing/pattern-info@2.19.0-alpha.1 mocha chai" + env: + CI: true + - name: Build pattern + run: cd packages/bee && npm run build + - name: Run pattern unit tests + run: cd packages/bee && npm run testci diff --git a/CHANGELOG.md b/CHANGELOG.md index 7463a705bbd..ac36332f42c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,24 @@ - Pattern.on() is now chainable as it returns the Pattern object +### holmes + +#### Added + + - Added the `headEase` option + - Added the `earLength` option + - Added the `earWidth` option + - Added the `visorWidth` option + - Added the `buttonhole` option + +#### Changed + + - The `brim` part has been renamed to `visor` because semantics + - The `brimWidth` option is now `visorWidth` + - _Gore_ has been changed to _Crown_ in the title + - _Ear_ has been changed to _Ear flap_ + - Added hem allowance at the hem, rather than standard seam allowance + ### hortensia #### Changed diff --git a/config/descriptions.yaml b/config/descriptions.yaml index 770509981d8..cf993fd88d3 100644 --- a/config/descriptions.yaml +++ b/config/descriptions.yaml @@ -1,6 +1,6 @@ aaron: 'A FreeSewing pattern for a A-shirt or tank top' albert: 'A FreeSewing pattern for an apron' -bee: 'A FreeSewing patter for a bikini' +bee: 'A FreeSewing pattern for a bikini' bella: 'A FreeSewing pattern for a womenswear bodice block' benjamin: 'A FreeSewing pattern for a bow tie' bent: 'A FreeSewing pattern for a menswear body block with a two-part sleeve' diff --git a/config/exceptions.yaml b/config/exceptions.yaml index 1a0cb34a05c..db52d8dd068 100644 --- a/config/exceptions.yaml +++ b/config/exceptions.yaml @@ -21,6 +21,8 @@ namedExports: - mui-theme - snapseries packageJson: + bee: + author: bobgeorgethe3rd (https://github.com/bobgeorgethe3rd) benjamin: author: woutervdub (https://github.com/woutervdub) components: diff --git a/packages/bee/CHANGELOG.md b/packages/bee/CHANGELOG.md new file mode 100644 index 00000000000..728295f4ad6 --- /dev/null +++ b/packages/bee/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change log for: @freesewing/bee + + + +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/bee/README.md b/packages/bee/README.md new file mode 100644 index 00000000000..f13cc8c7443 --- /dev/null +++ b/packages/bee/README.md @@ -0,0 +1,118 @@ +![FreeSewing](https://static.freesewing.org/banner.png) +

@freesewing/bee on NPM + License: MIT + Code quality on DeepScan + Open issues tagged pkg:bee + Project board +

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

+ +# @freesewing/bee + +A FreeSewing pattern for a bikini + + + +## What am I looking at? 🤔 + +This repository is our *monorepo* +holding [all our NPM packages](https://freesewing.dev/reference/packages/). + +This folder holds: @freesewing/bee + +## About FreeSewing 💀 + +Where the world of makers and developers collide, that's where you'll find FreeSewing. + +If you're a maker, checkout [freesewing.org](https://freesewing.org/) where you can generate +our sewing patterns adapted to your measurements. + +If you're a developer, our documentation is on [freesewing.dev](https://freesewing.dev/). +Our [core library](https://freesewing.dev/reference/api/) is a *batteries-included* toolbox +for parametric design of sewing patterns. But we also provide a range +of [plugins](https://freesewing.dev/reference/plugins/) that further extend the +functionality of the platform. + +If you have NodeJS installed, you can try it right now by running: + +```bash +npx create-freesewing-pattern +``` + +Or, consult our getting started guides +for [Linux](https://freesewing.dev/tutorials/getting-started-linux/), +[MacOS](https://freesewing.dev/tutorials/getting-started-mac/), +or [Windows](https://freesewing.dev/tutorials/getting-started-windows/). + +We also have a [pattern design tutorial](https://freesewing.dev/tutorials/pattern-design/) that +walks you through your first parametric design, +and [a friendly community](https://freesewing.org/community/where/) with +people who can help you when you get stuck. + +## 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, and you can spend a few coind without +hardship, then you should [join us and become a patron](https://freesewing.org/community/join). + +## Links 👩‍💻 + + - 💻 Makers website: [freesewing.org](https://freesewing.org) + - 💻 Developers website: [freesewing.dev](https://freesewing.dev) + - 💬 Chat: On Discord via [discord.freesewing.org](https://discord.freesewing.org/) + - ✅ Todo list/Kanban board: On Github via [todo.freesewing.org](https://todo.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/bee/example/package.json b/packages/bee/example/package.json index 37cad774b05..3578ae6ab1b 100644 --- a/packages/bee/example/package.json +++ b/packages/bee/example/package.json @@ -1,7 +1,7 @@ { "name": "bee", "homepage": "https://bee.freesewing.dev/", - "version": "2.18.0-rc.2", + "version": "", "private": true, "dependencies": { "@fontsource/permanent-marker": "latest", diff --git a/packages/bee/package.json b/packages/bee/package.json new file mode 100644 index 00000000000..a9ddca65d31 --- /dev/null +++ b/packages/bee/package.json @@ -0,0 +1,93 @@ +{ + "name": "@freesewing/bee", + "version": "2.19.0-alpha.1", + "description": "A FreeSewing pattern for a bikini", + "author": "bobgeorgethe3rd (https://github.com/bobgeorgethe3rd)", + "homepage": "https://freesewing.org/", + "repository": "github:freesewing/freesewing", + "license": "MIT", + "bugs": { + "url": "https://github.com/freesewing/freesewing/issues" + }, + "funding": { + "type": "individual", + "url": "https://freesewing.org/patrons/join" + }, + "keywords": [ + "freesewing", + "design", + "diy", + "fashion", + "made to measure", + "parametric design", + "pattern", + "sewing", + "sewing pattern" + ], + "main": "dist/index.js", + "module": "dist/index.mjs", + "scripts": { + "clean": "rimraf dist", + "build": "rollup -c", + "lernabuild": "rollup -c", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", + "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", + "netlify": "echo \"Not configured yet\"", + "testci": "BABEL_ENV=production ./node_modules/.bin/_mocha tests/*.test.js --require @babel/register" + }, + "peerDependencies": { + "@freesewing/core": "^2.19.0-alpha.1", + "@freesewing/plugin-bundle": "^2.19.0-alpha.1" + }, + "dependencies": {}, + "devDependencies": { + "react": "^17.0.2", + "react-dom": "^17.0.2", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@freesewing/components": "^2.19.0-alpha.1", + "@freesewing/css-theme": "^2.19.0-alpha.1", + "@freesewing/i18n": "^2.19.0-alpha.1", + "@freesewing/mui-theme": "^2.19.0-alpha.1", + "@freesewing/plugin-bust": "^2.19.0-alpha.1", + "@freesewing/plugin-buttons": "^2.19.0-alpha.1", + "@freesewing/plugin-flip": "^2.19.0-alpha.1", + "@freesewing/utils": "^2.19.0-alpha.1", + "react-scripts": "^4.0.3", + "webpack": "^5.37.0", + "rollup": "^2.50.6", + "@rollup/plugin-babel": "^5.3.0", + "@rollup/plugin-commonjs": "^20.0.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.0.0", + "rollup-plugin-peer-deps-external": "^2.2.4", + "@material-ui/core": "^4.11.4", + "@material-ui/icons": "^4.11.2", + "@material-ui/lab": "^v4.0.0-alpha.57", + "axios": "0.21.1", + "react-intl": "^5.17.6", + "prop-types": "^15.7.2", + "mocha": "^9.1.1", + "chai": "^4.2.0", + "chai-string": "^1.5.0", + "@babel/register": "^7.10.5" + }, + "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/bee/rollup.config.js b/packages/bee/rollup.config.js new file mode 100644 index 00000000000..83bc5ef0eec --- /dev/null +++ b/packages/bee/rollup.config.js @@ -0,0 +1,29 @@ +import resolve from '@rollup/plugin-node-resolve' +import commonjs from '@rollup/plugin-commonjs' +import json from '@rollup/plugin-json' +import peerDepsExternal from 'rollup-plugin-peer-deps-external' +import { name, version, description, author, license, main, module, rollup } from './package.json' + +const banner = `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */` +const output = [ + { + banner, + file: main, + format: 'cjs', + sourcemap: true, + exports: rollup.exports, + }, +] +if (typeof module !== 'undefined') + output.push({ + banner, + file: module, + format: 'es', + sourcemap: true, + }) + +export default { + input: 'src/index.js', + output, + plugins: [peerDepsExternal(), resolve({ modulesOnly: true }), commonjs(), json()], +} diff --git a/packages/bee/tests/shared.test.js b/packages/bee/tests/shared.test.js new file mode 100644 index 00000000000..979d527f0bf --- /dev/null +++ b/packages/bee/tests/shared.test.js @@ -0,0 +1,39 @@ +// This file is auto-generated. +// Changes you make will be overwritten. +const expect = require("chai").expect; +const models = require("@freesewing/models") +const patterns = require("@freesewing/pattern-info") + +const Bee = require('../dist') + +// Shared tests +const testPatternConfig = require('../../../tests/patterns/config') +const testPatternDrafting = require('../../../tests/patterns/drafting') +const testPatternSampling = require('../../../tests/patterns/sampling') + +// Test config +testPatternConfig( + 'bee', + new Bee(), + expect, + models, + patterns +) + +// Test drafting +testPatternDrafting( + 'bee', + Bee, + expect, + models, + patterns +) + +// Test sampling +testPatternSampling( + 'bee', + Bee, + expect, + models, + patterns +) diff --git a/packages/holmes/CHANGELOG.md b/packages/holmes/CHANGELOG.md index ce75e93423c..748fd1f38a5 100644 --- a/packages/holmes/CHANGELOG.md +++ b/packages/holmes/CHANGELOG.md @@ -1,6 +1,24 @@ # Change log for: @freesewing/holmes +## unreleased (NaN-NaN-NaN) + +### Added + + - Added the `headEase` option + - Added the `earLength` option + - Added the `earWidth` option + - Added the `visorWidth` option + - Added the `buttonhole` option + +### Changed + + - The `brim` part has been renamed to `visor` because semantics + - The `brimWidth` option is now `visorWidth` + - _Gore_ has been changed to _Crown_ in the title + - _Ear_ has been changed to _Ear flap_ + - Added hem allowance at the hem, rather than standard seam allowance + ## 2.18.0 (2021-09-09) ### Fixed diff --git a/packages/pattern-info/src/index.js b/packages/pattern-info/src/index.js index 43351728fec..b8f7870a21e 100644 --- a/packages/pattern-info/src/index.js +++ b/packages/pattern-info/src/index.js @@ -9,6 +9,7 @@ export { default as info } from './prebuild/info' export const list = [ 'aaron', 'albert', + 'bee', 'bella', 'benjamin', 'bent', @@ -86,4 +87,4 @@ export const withoutBreasts = [ 'yuri', ] -export const withBreasts = ['bella', 'breanna', 'cathrin', 'carlita', 'diana', 'simone'] +export const withBreasts = ['bee', 'bella', 'breanna', 'cathrin', 'carlita', 'diana', 'simone'] diff --git a/packages/pattern-info/src/prebuild.js b/packages/pattern-info/src/prebuild.js index 307b1dbb465..74a71ee70d2 100644 --- a/packages/pattern-info/src/prebuild.js +++ b/packages/pattern-info/src/prebuild.js @@ -2,6 +2,7 @@ const path = require('path') const fse = require('fs-extra') const aaron = require('@freesewing/aaron').config const albert = require('@freesewing/albert').config +const bee = require('@freesewing/bee').config const bella = require('@freesewing/bella').config const benjamin = require('@freesewing/benjamin').config const bent = require('@freesewing/bent').config @@ -44,6 +45,7 @@ const yuri = require('@freesewing/yuri').config const patterns = { aaron, albert, + bee, bella, benjamin, bent,