1
0
Fork 0

wrench: Updated rollup config

This commit is contained in:
Joost De Cock 2019-04-13 15:36:37 +02:00
parent 1526ea3974
commit 171d6207de
4 changed files with 321 additions and 35 deletions

View file

@ -348,9 +348,9 @@
}
},
"@babel/plugin-proposal-object-rest-spread": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz",
"integrity": "sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg==",
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz",
"integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
@ -387,6 +387,15 @@
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-syntax-dynamic-import": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz",
"integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-syntax-json-strings": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz",
@ -881,6 +890,12 @@
"to-fast-properties": "^2.0.0"
}
},
"@comandeer/babel-plugin-banner": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@comandeer/babel-plugin-banner/-/babel-plugin-banner-4.1.0.tgz",
"integrity": "sha512-9hKVIN2+maygxkngnXDsZXRZqCYDY4pxIRljJqqJ5A+eJZzW3k/NZj5lixEmStjWFjlPlOHGYBytBehpf0l+hA==",
"dev": true
},
"@samverschueren/stream-to-observable": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz",
@ -1145,6 +1160,243 @@
}
}
},
"babel-helper-evaluate-path": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.5.0.tgz",
"integrity": "sha512-mUh0UhS607bGh5wUMAQfOpt2JX2ThXMtppHRdRU1kL7ZLRWIXxoV2UIV1r2cAeeNeU1M5SB5/RSUgUxrK8yOkA==",
"dev": true
},
"babel-helper-flip-expressions": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.4.3.tgz",
"integrity": "sha1-NpZzahKKwYvCUlS19AoizrPB0/0=",
"dev": true
},
"babel-helper-is-nodes-equiv": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz",
"integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=",
"dev": true
},
"babel-helper-is-void-0": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.4.3.tgz",
"integrity": "sha1-fZwBtFYee5Xb2g9u7kj1tg5nMT4=",
"dev": true
},
"babel-helper-mark-eval-scopes": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.4.3.tgz",
"integrity": "sha1-0kSjvvmESHJgP/tG4izorN9VFWI=",
"dev": true
},
"babel-helper-remove-or-void": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz",
"integrity": "sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA=",
"dev": true
},
"babel-helper-to-multiple-sequence-expressions": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz",
"integrity": "sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA==",
"dev": true
},
"babel-plugin-minify-builtins": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.5.0.tgz",
"integrity": "sha512-wpqbN7Ov5hsNwGdzuzvFcjgRlzbIeVv1gMIlICbPj0xkexnfoIDe7q+AZHMkQmAE/F9R5jkrB6TLfTegImlXag==",
"dev": true
},
"babel-plugin-minify-constant-folding": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.5.0.tgz",
"integrity": "sha512-Vj97CTn/lE9hR1D+jKUeHfNy+m1baNiJ1wJvoGyOBUx7F7kJqDZxr9nCHjO/Ad+irbR3HzR6jABpSSA29QsrXQ==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "^0.5.0"
}
},
"babel-plugin-minify-dead-code-elimination": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.0.tgz",
"integrity": "sha512-XQteBGXlgEoAKc/BhO6oafUdT4LBa7ARi55mxoyhLHNuA+RlzRmeMAfc31pb/UqU01wBzRc36YqHQzopnkd/6Q==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "^0.5.0",
"babel-helper-mark-eval-scopes": "^0.4.3",
"babel-helper-remove-or-void": "^0.4.3",
"lodash.some": "^4.6.0"
}
},
"babel-plugin-minify-flip-comparisons": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.4.3.tgz",
"integrity": "sha1-AMqHDLjxO0XAOLPB68DyJyk8llo=",
"dev": true,
"requires": {
"babel-helper-is-void-0": "^0.4.3"
}
},
"babel-plugin-minify-guarded-expressions": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.3.tgz",
"integrity": "sha1-zHCbRFP9IbHzAod0RMifiEJ845c=",
"dev": true,
"requires": {
"babel-helper-flip-expressions": "^0.4.3"
}
},
"babel-plugin-minify-infinity": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.4.3.tgz",
"integrity": "sha1-37h2obCKBldjhO8/kuZTumB7Oco=",
"dev": true
},
"babel-plugin-minify-mangle-names": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.5.0.tgz",
"integrity": "sha512-3jdNv6hCAw6fsX1p2wBGPfWuK69sfOjfd3zjUXkbq8McbohWy23tpXfy5RnToYWggvqzuMOwlId1PhyHOfgnGw==",
"dev": true,
"requires": {
"babel-helper-mark-eval-scopes": "^0.4.3"
}
},
"babel-plugin-minify-numeric-literals": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.4.3.tgz",
"integrity": "sha1-jk/VYcefeAEob/YOjF/Z3u6TwLw=",
"dev": true
},
"babel-plugin-minify-replace": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0.tgz",
"integrity": "sha512-aXZiaqWDNUbyNNNpWs/8NyST+oU7QTpK7J9zFEFSA0eOmtUNMU3fczlTTTlnCxHmq/jYNFEmkkSG3DDBtW3Y4Q==",
"dev": true
},
"babel-plugin-minify-simplify": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.5.0.tgz",
"integrity": "sha512-TM01J/YcKZ8XIQd1Z3nF2AdWHoDsarjtZ5fWPDksYZNsoOjQ2UO2EWm824Ym6sp127m44gPlLFiO5KFxU8pA5Q==",
"dev": true,
"requires": {
"babel-helper-flip-expressions": "^0.4.3",
"babel-helper-is-nodes-equiv": "^0.0.1",
"babel-helper-to-multiple-sequence-expressions": "^0.5.0"
}
},
"babel-plugin-minify-type-constructors": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz",
"integrity": "sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA=",
"dev": true,
"requires": {
"babel-helper-is-void-0": "^0.4.3"
}
},
"babel-plugin-transform-inline-consecutive-adds": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz",
"integrity": "sha1-Mj1Ho+pjqDp6w8gRro5pQfrysNE=",
"dev": true
},
"babel-plugin-transform-member-expression-literals": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz",
"integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=",
"dev": true
},
"babel-plugin-transform-merge-sibling-variables": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz",
"integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=",
"dev": true
},
"babel-plugin-transform-minify-booleans": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz",
"integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=",
"dev": true
},
"babel-plugin-transform-property-literals": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz",
"integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=",
"dev": true,
"requires": {
"esutils": "^2.0.2"
}
},
"babel-plugin-transform-regexp-constructors": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz",
"integrity": "sha1-WLd3W2OvzzMyj66aX4j71PsLSWU=",
"dev": true
},
"babel-plugin-transform-remove-console": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz",
"integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=",
"dev": true
},
"babel-plugin-transform-remove-debugger": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz",
"integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=",
"dev": true
},
"babel-plugin-transform-remove-undefined": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.5.0.tgz",
"integrity": "sha512-+M7fJYFaEE/M9CXa0/IRkDbiV3wRELzA1kKQFCJ4ifhrzLKn/9VCCgj9OFmYWwBd8IB48YdgPkHYtbYq+4vtHQ==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "^0.5.0"
}
},
"babel-plugin-transform-simplify-comparison-operators": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz",
"integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=",
"dev": true
},
"babel-plugin-transform-undefined-to-void": {
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz",
"integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=",
"dev": true
},
"babel-preset-minify": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.5.0.tgz",
"integrity": "sha512-xj1s9Mon+RFubH569vrGCayA9Fm2GMsCgDRm1Jb8SgctOB7KFcrVc2o8K3YHUyMz+SWP8aea75BoS8YfsXXuiA==",
"dev": true,
"requires": {
"babel-plugin-minify-builtins": "^0.5.0",
"babel-plugin-minify-constant-folding": "^0.5.0",
"babel-plugin-minify-dead-code-elimination": "^0.5.0",
"babel-plugin-minify-flip-comparisons": "^0.4.3",
"babel-plugin-minify-guarded-expressions": "^0.4.3",
"babel-plugin-minify-infinity": "^0.4.3",
"babel-plugin-minify-mangle-names": "^0.5.0",
"babel-plugin-minify-numeric-literals": "^0.4.3",
"babel-plugin-minify-replace": "^0.5.0",
"babel-plugin-minify-simplify": "^0.5.0",
"babel-plugin-minify-type-constructors": "^0.4.3",
"babel-plugin-transform-inline-consecutive-adds": "^0.4.3",
"babel-plugin-transform-member-expression-literals": "^6.9.4",
"babel-plugin-transform-merge-sibling-variables": "^6.9.4",
"babel-plugin-transform-minify-booleans": "^6.9.4",
"babel-plugin-transform-property-literals": "^6.9.4",
"babel-plugin-transform-regexp-constructors": "^0.4.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-plugin-transform-remove-debugger": "^6.9.4",
"babel-plugin-transform-remove-undefined": "^0.5.0",
"babel-plugin-transform-simplify-comparison-operators": "^6.9.4",
"babel-plugin-transform-undefined-to-void": "^6.9.4",
"lodash.isplainobject": "^4.0.6"
}
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@ -4012,6 +4264,18 @@
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"dev": true
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
"dev": true
},
"lodash.some": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
"integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=",
"dev": true
},
"log-symbols": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
@ -4427,6 +4691,7 @@
"version": "0.1.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"kind-of": "^3.0.2",
"longest": "^1.0.1",
@ -5369,7 +5634,8 @@
"longest": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"lru-cache": {
"version": "4.1.3",
@ -7206,6 +7472,19 @@
"rollup-pluginutils": "^2.3.0"
}
},
"rollup-plugin-babel-minify": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-babel-minify/-/rollup-plugin-babel-minify-8.0.0.tgz",
"integrity": "sha512-w9bGqvFAFX4IzCqVNtE97tfZdfi2zT1O9uDUDjWa4bLzkQl+vg39abR+z7cXlDP4T7vfvUmHWRlUtZHr/cRjDQ==",
"dev": true,
"requires": {
"@babel/core": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@comandeer/babel-plugin-banner": "^4.0.0",
"babel-preset-minify": "^0.5.0",
"sourcemap-codec": "^1.4.3"
}
},
"rollup-plugin-filesize": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/rollup-plugin-filesize/-/rollup-plugin-filesize-4.0.1.tgz",
@ -7548,6 +7827,12 @@
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
"dev": true
},
"sourcemap-codec": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz",
"integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==",
"dev": true
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",

View file

@ -17,7 +17,6 @@
"patterns"
],
"main": "dist/index.js",
"unpkg": "dist/browser.js",
"module": "dist/index.mjs",
"scripts": {
"patch": "npm version patch -m ':bookmark: v%s' && npm run build",
@ -30,11 +29,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 -m true --name freesewing.plugins.i18n",
"nodebuild": "rollup -c rollup.js --file dist/index.js --format cjs -m true",
"modulebuild": "rollup -c rollup.js --file dist/index.mjs --format es -m true",
"rebuild": "npm run nodebuild && npm run modulebuild",
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
"nodebuild": "rollup -c -o dist/index.js -f cjs",
"modulebuild": "rollup -c -o dist/index.mjs -f es",
"build": "npm run clean && npm run nodebuild && npm run modulebuild"
},
"husky": {
"hooks": {
@ -49,6 +46,7 @@
},
"devDependencies": {
"@babel/core": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "7.4.3",
"@babel/preset-env": "^7.1.0",
"@babel/register": "^7.0.0",
"chai": "^4.1.2",
@ -66,10 +64,10 @@
"rimraf": "^2.6.2",
"rollup": "^0.66.2",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-babel-minify": "8.0.0",
"rollup-plugin-filesize": "^4.0.1",
"rollup-plugin-json": "^3.0.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-terser": "^1.0.1"
"rollup-plugin-node-resolve": "^3.3.0"
},
"files": [
"dist/*",

View file

@ -0,0 +1,26 @@
import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import json from "rollup-plugin-json";
import minify from "rollup-plugin-babel-minify";
import path from "path";
import { name, version, description, author, license } from "./package.json";
export default {
input: "src/index.js",
output: {
sourcemap: true
},
plugins: [
resolve({ browser: true }),
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,23 +0,0 @@
import { terser } from "rollup-plugin-terser";
import babel from "rollup-plugin-babel";
import resolve from "rollup-plugin-node-resolve";
import json from "rollup-plugin-json";
import { version, name, description, author, license } from "./package.json";
export default {
input: "src/index.js",
plugins: [
resolve({
browser: true
}),
json(),
babel({
exclude: "node_modules/**"
}),
terser({
output: {
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
}
})
]
};