✨ Added constructors to shorthand
This commit is contained in:
parent
e792cf61ff
commit
62c35fe19d
3 changed files with 14 additions and 9 deletions
|
@ -2,7 +2,7 @@
|
||||||
"name": "freesewing",
|
"name": "freesewing",
|
||||||
"version": "0.4.2",
|
"version": "0.4.2",
|
||||||
"description": "A library for creating made-to-measure sewing patterns",
|
"description": "A library for creating made-to-measure sewing patterns",
|
||||||
"author": "Joost De Cock <joost@decock.org>",
|
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",
|
||||||
"homepage": "https://freesewing.org/",
|
"homepage": "https://freesewing.org/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -25,9 +25,9 @@
|
||||||
"clean": "rimraf dist",
|
"clean": "rimraf dist",
|
||||||
"pretty": "npx prettier --write \"src/*.js\"",
|
"pretty": "npx prettier --write \"src/*.js\"",
|
||||||
"lint": "eslint --fix \"src/*.js\"",
|
"lint": "eslint --fix \"src/*.js\"",
|
||||||
"browserbuild": "rollup -c rollup.js --file dist/browser.js --format iife --name freesewing",
|
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -n freesewing",
|
||||||
"nodebuild": "rollup -c rollup.js --file dist/index.js --format cjs",
|
"nodebuild": "rollup -c rollup.js -o dist/index.js -f cjs",
|
||||||
"modulebuild": "rollup -c rollup.js --file dist/index.mjs --format es",
|
"modulebuild": "rollup -c rollup.js -o dist/index.mjs -f es",
|
||||||
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
|
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
|
12
rollup.js
12
rollup.js
|
@ -1,6 +1,7 @@
|
||||||
import { terser } from "rollup-plugin-terser";
|
import { terser } from "rollup-plugin-terser";
|
||||||
import babel from "rollup-plugin-babel";
|
import babel from "rollup-plugin-babel";
|
||||||
import resolve from "rollup-plugin-node-resolve";
|
import resolve from "rollup-plugin-node-resolve";
|
||||||
|
import commonjs from "rollup-plugin-commonjs";
|
||||||
import json from "rollup-plugin-json";
|
import json from "rollup-plugin-json";
|
||||||
import { name, version, description, author, license } from "./package.json";
|
import { name, version, description, author, license } from "./package.json";
|
||||||
|
|
||||||
|
@ -11,13 +12,14 @@ export default {
|
||||||
browser: true
|
browser: true
|
||||||
}),
|
}),
|
||||||
json(),
|
json(),
|
||||||
|
commonjs(),
|
||||||
babel({
|
babel({
|
||||||
exclude: "node_modules/**"
|
exclude: "node_modules/**"
|
||||||
}),
|
|
||||||
terser({
|
|
||||||
output: {
|
|
||||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
//terser({
|
||||||
|
// output: {
|
||||||
|
// preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||||
|
// }
|
||||||
|
//})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -75,6 +75,9 @@ export function shorthand(part) {
|
||||||
paths: part.paths || {},
|
paths: part.paths || {},
|
||||||
snippets: part.snippets || {},
|
snippets: part.snippets || {},
|
||||||
macro: part.macroRunner(),
|
macro: part.macroRunner(),
|
||||||
|
point: part.point,
|
||||||
|
path: part.path,
|
||||||
|
snippet: part.snippet,
|
||||||
final,
|
final,
|
||||||
paperless
|
paperless
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue