1
0
Fork 0

chore: Renaming Fu to Florence. See #382

This commit is contained in:
Joost De Cock 2020-04-26 10:54:55 +02:00
parent b071a04bde
commit 291b30baee
21 changed files with 108 additions and 170 deletions

View file

@ -53,7 +53,7 @@ Unreleased:
2.4.5:
date: 2020-03-19
Changes:
fu:
florence:
- Improved shape based on community feedback
utils:
- neckstimate() now returns values rounded to nearest mm
@ -108,8 +108,8 @@ Unreleased:
2.4.0:
date: 2020-02-29
Added:
fu:
- Fu is a face mask pattern
florence:
- Florence is a face mask pattern
2.3.0:
date: 2020-02-23

View file

@ -14,7 +14,7 @@ css-theme: 'A CSS theme for FreeSewing web UIs'
diana: 'A FreeSewing pattern for a top with a draped neck'
examples: 'A FreeSewing pattern holding examples for our documentation'
florent: 'A FreeSewing pattern for a flat cap'
fu: 'A FreeSewing pattern for a face mask'
florence: 'A FreeSewing pattern for a face mask'
gatsby-remark-jargon: 'A gatsby-transformer-remark sub-plugin for jargon terms'
holmes: 'A FreeSewing pattern for a Sherlock Holmes hat'
huey: 'A FreeSewing pattern for a zip-up hoodie'

View file

@ -1,133 +1,107 @@
# Change log for: @freesewing/fu
## Unreleased
**Note:** Version bump only for package fu
## 2.5.0 (2020-04-05)
**Note:** Version bump only for package fu
## 2.4.6 (2020-03-23)
**Note:** Version bump only for package fu
## 2.4.5 (2020-03-19)
**Note:** Version bump only for package fu
## 2.4.4 (2020-03-15)
**Note:** Version bump only for package fu
## 2.4.3 (2020-03-12)
**Note:** Version bump only for package fu
## 2.4.2 (2020-03-08)
**Note:** Version bump only for package fu
## 2.4.1 (2020-03-04)
**Note:** Version bump only for package fu
## 2.4.0 (2020-02-29)
### Added
- Fu is a face mask pattern
- Fu is a face mask pattern
## 2.3.0 (2020-02-23)
**Note:** Version bump only for package fu
## 2.2.0 (2020-02-22)
**Note:** Version bump only for package fu
## 2.1.9 (2020-01-18)
**Note:** Version bump only for package fu
## 2.1.8 (2019-12-16)
**Note:** Version bump only for package fu
## 2.1.7 (2019-12-15)
**Note:** Version bump only for package fu
## 2.1.6 (2019-11-24)
**Note:** Version bump only for package fu
## 2.1.5 (2019-11-19)
**Note:** Version bump only for package fu
## 2.1.4 (2019-11-01)
**Note:** Version bump only for package fu
## 2.1.3 (2019-10-18)
**Note:** Version bump only for package fu
## 2.1.2 (2019-10-14)
**Note:** Version bump only for package fu
## 2.1.1 (2019-10-13)
**Note:** Version bump only for package fu
## 2.1.0 (2019-10-06)
**Note:** Version bump only for package fu
## 2.0.4 (2019-09-27)
**Note:** Version bump only for package fu
## 2.0.3 (2019-09-15)
**Note:** Version bump only for package fu
## 2.0.2 (2019-09-06)
**Note:** Version bump only for package fu
## 2.0.1 (2019-09-01)
**Note:** Version bump only for package fu
## 2.0.0 (2019-08-25)
This is the **initial release**, and the start of this change log.

View file

@ -1,4 +1,5 @@
![FreeSewing](https://freesewing.org/banner.jpg)
<p align='center'><a
href="https://www.npmjs.com/package/@freesewing/fu"
title="@freesewing/fu on NPM"
@ -43,18 +44,16 @@
## What am I looking at? 🤔
This repository is our *monorepo* holding [all our NPM packages](https://www.npmjs.com/search?q=keywords:freesewing).
This repository is our _monorepo_ holding [all our NPM packages](https://www.npmjs.com/search?q=keywords:freesewing).
This folder holds **@freesewing/fu**
A FreeSewing pattern for a face mask
## 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
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:
@ -81,11 +80,11 @@ 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: [gitter.im/freesewing](https://gitter.im/freesewing/chat)
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
- 💻 Makers website: [freesewing.org](https://freesewing.org)
- 💻 Developers website: [freesewing.dev](https://freesewing.dev)
- 💬 Chat: [gitter.im/freesewing](https://gitter.im/freesewing/chat)
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
## License: MIT 🤓

View file

@ -1,7 +1,7 @@
import { version } from '../package.json'
export default {
name: 'fu',
name: 'florence',
version: version,
design: 'Joost De Cock',
code: 'Joost De Cock',
@ -10,13 +10,13 @@ export default {
difficulty: 1,
tags: [],
optionGroups: {
fit: ['height', 'length', 'curve' ]
fit: ['height', 'length', 'curve']
},
measurements: ['headCircumference'],
parts: ['mask'],
options: {
length: { pct: 40, min: 35, max: 45 },
height: { pct: 26, min: 23, max: 29 },
curve: { pct: 12.5, min: 10, max: 15 },
curve: { pct: 12.5, min: 10, max: 15 }
}
}

View file

@ -40,8 +40,8 @@ It is **not** part of the pattern's source code.
To run this example, follow these steps:
- In the folder above this one, run: `yarn start` (or `npm start`)
- Then, in new terminal, run the same command in this folder: `yarn start` (or `npm start`)
- In the folder above this one, run: `yarn start` (or `npm start`)
- Then, in new terminal, run the same command in this folder: `yarn start` (or `npm start`)
This will spin up the development environment, similar to [our online demo](https://fu.freesewing.dev/).
@ -49,7 +49,7 @@ This will spin up the development environment, similar to [our online demo](http
Where the world of makers and developers collide, that's where you'll find FreeSewing.
Our [core library](https://freesewing.dev/en/freesewing) is a *batteries-included* toolbox
Our [core library](https://freesewing.dev/en/freesewing) is a _batteries-included_ toolbox
for parametric design of sewing patterns. It's a modular system (check our list
of [plugins](https://freesewing.dev/en/plugins) and getting started is as simple as:
@ -76,11 +76,11 @@ should [become a patron](https://freesewing.org/patrons/join).
## Links 👩‍💻
- 💻 Makers website: [freesewing.org](https://freesewing.org)
- 💻 Developers website: [freesewing.dev](https://freesewing.org)
- 💬 Chat: [gitter.im/freesewing](https://gitter.im/freesewing/freesewing)
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
- 💻 Makers website: [freesewing.org](https://freesewing.org)
- 💻 Developers website: [freesewing.dev](https://freesewing.org)
- 💬 Chat: [gitter.im/freesewing](https://gitter.im/freesewing/freesewing)
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
## License: MIT 🤓
@ -93,4 +93,3 @@ Our [chatroom on Gitter](https://gitter.im) is 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).

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.

View file

@ -6,18 +6,11 @@ import '@freesewing/css-theme'
import Pattern from 'pattern'
const App = props => {
const App = (props) => {
let instance = new Pattern()
let config = instance.config
return (
<Workbench
freesewing={freesewing}
Pattern={Pattern}
config={config}
userLanguage="en"
/>
)
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
}
export default App

View file

@ -53,7 +53,7 @@ export function register(config) {
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
.then((registration) => {
registration.onupdatefound = () => {
const installingWorker = registration.installing
installingWorker.onstatechange = () => {
@ -84,7 +84,7 @@ function registerValidSW(swUrl, config) {
}
}
})
.catch(error => {
.catch((error) => {
console.error('Error during service worker registration:', error)
})
}
@ -92,14 +92,14 @@ function registerValidSW(swUrl, config) {
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl)
.then(response => {
.then((response) => {
// Ensure service worker exists, and that we really are getting a JS file.
if (
response.status === 404 ||
response.headers.get('content-type').indexOf('javascript') === -1
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
navigator.serviceWorker.ready.then((registration) => {
registration.unregister().then(() => {
window.location.reload()
})
@ -116,7 +116,7 @@ function checkValidServiceWorker(swUrl, config) {
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
navigator.serviceWorker.ready.then((registration) => {
registration.unregister()
})
}

View file

@ -1,5 +1,5 @@
{
"name": "@freesewing/fu",
"name": "@freesewing/florence",
"version": "2.5.0",
"description": "A FreeSewing pattern for a face mask",
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",

View file

@ -0,0 +1,41 @@
import babel from 'rollup-plugin-babel'
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import json from 'rollup-plugin-json'
import minify from 'rollup-plugin-babel-minify'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import { name, version, description, author, license, main, module } from './package.json'
const output = [
{
file: main,
format: 'cjs',
sourcemap: true
}
]
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(),
babel({
exclude: 'node_modules/**',
plugins: ['@babel/plugin-proposal-object-rest-spread']
}),
minify({
comments: false,
sourceMap: true,
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
})
]
}

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let {
points,
Point,
@ -24,16 +24,13 @@ export default part => {
points.topEdge = points.topLeft.shiftFractionTowards(points.bottomLeft, 0.2)
points.bottomEdge = points.bottomLeft.shiftFractionTowards(points.topLeft, 0.18)
points.topTip = points.topRight.shiftFractionTowards(points.topLeft, 0.1)
points.bottomTip = points.bottomRight.shiftFractionTowards(
points.bottomLeft,
0.4
)
points.bottomTip = points.bottomRight.shiftFractionTowards(points.bottomLeft, 0.4)
points.tipCenterCp2 = points.tipCenter.shiftFractionTowards(points.topRight, 0.55)
points.tipCenterCp1 = points.tipCenter.shiftFractionTowards(points.bottomRight, 0.5)
points.topTipCp2 = points.topEdge.shift(0, measurements.headCircumference * options.curve)
points.topTipCp1 = points.topTip
.shiftTowards(points.topTipCp2, points.topTip.dist(points.tipCenterCp2)/2)
.shiftTowards(points.topTipCp2, points.topTip.dist(points.tipCenterCp2) / 2)
.rotate(90, points.topTip)
points.tipCenterCp1 = points.tipCenterCp1.rotate(-4, points.tipCenter)
@ -45,7 +42,9 @@ export default part => {
points.bottomTip.shift(15, 30),
points.tipCenter,
points.tipCenterCp1
), 0.75)
),
0.75
)
paths.seam = new Path()
.move(points.topEdge)

View file

@ -0,0 +1,21 @@
// 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 Florence = 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('florence', new Florence(), expect, models, patterns)
// Test drafting
testPatternDrafting('florence', Florence, expect, models, patterns)
// Test sampling
testPatternSampling('florence', Florence, expect, models, patterns)

View file

@ -1,49 +0,0 @@
import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import json from "rollup-plugin-json";
import minify from "rollup-plugin-babel-minify";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import {
name,
version,
description,
author,
license,
main,
module
} from "./package.json";
const output = [
{
file: main,
format: "cjs",
sourcemap: true
}
];
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(),
babel({
exclude: "node_modules/**",
plugins: ["@babel/plugin-proposal-object-rest-spread"]
}),
minify({
comments: false,
sourceMap: true,
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
})
]
};

View file

@ -1,39 +0,0 @@
// 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 Fu = 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(
'fu',
new Fu(),
expect,
models,
patterns
)
// Test drafting
testPatternDrafting(
'fu',
Fu,
expect,
models,
patterns
)
// Test sampling
testPatternSampling(
'fu',
Fu,
expect,
models,
patterns
)