✨ 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",
|
||||
"version": "0.4.2",
|
||||
"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/",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
@ -25,9 +25,9 @@
|
|||
"clean": "rimraf dist",
|
||||
"pretty": "npx prettier --write \"src/*.js\"",
|
||||
"lint": "eslint --fix \"src/*.js\"",
|
||||
"browserbuild": "rollup -c rollup.js --file dist/browser.js --format iife --name freesewing",
|
||||
"nodebuild": "rollup -c rollup.js --file dist/index.js --format cjs",
|
||||
"modulebuild": "rollup -c rollup.js --file dist/index.mjs --format es",
|
||||
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -n freesewing",
|
||||
"nodebuild": "rollup -c rollup.js -o dist/index.js -f cjs",
|
||||
"modulebuild": "rollup -c rollup.js -o dist/index.mjs -f es",
|
||||
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
|
||||
},
|
||||
"husky": {
|
||||
|
|
12
rollup.js
12
rollup.js
|
@ -1,6 +1,7 @@
|
|||
import { terser } from "rollup-plugin-terser";
|
||||
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 { name, version, description, author, license } from "./package.json";
|
||||
|
||||
|
@ -11,13 +12,14 @@ export default {
|
|||
browser: true
|
||||
}),
|
||||
json(),
|
||||
commonjs(),
|
||||
babel({
|
||||
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 || {},
|
||||
snippets: part.snippets || {},
|
||||
macro: part.macroRunner(),
|
||||
point: part.point,
|
||||
path: part.path,
|
||||
snippet: part.snippet,
|
||||
final,
|
||||
paperless
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue