1
0
Fork 0

wrench: Updated rollup config

This commit is contained in:
Joost De Cock 2019-04-13 15:59:10 +02:00
parent ea644c9b1f
commit a98558f8aa
3 changed files with 36 additions and 94 deletions

View file

@ -106,8 +106,7 @@
"@babel/helper-plugin-utils": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz",
"integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==",
"dev": true
"integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA=="
},
"@babel/helper-split-export-declaration": {
"version": "7.0.0",
@ -183,6 +182,15 @@
"integrity": "sha512-xsH1CJoln2r74hR+y7cg2B5JCPaTh+Hd+EbBRk9nWGSNspuo6krjhX0Om6RnRQuIvFq8wVXCLKH3kwKDYhanSg==",
"dev": true
},
"@babel/plugin-proposal-object-rest-spread": {
"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==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-syntax-object-rest-spread": "^7.2.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",
@ -192,6 +200,14 @@
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/plugin-syntax-object-rest-spread": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz",
"integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==",
"requires": {
"@babel/helper-plugin-utils": "^7.0.0"
}
},
"@babel/runtime": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz",
@ -266,26 +282,6 @@
"integrity": "sha512-5EwY5b2thB5DMokBCm4DnkUgd1vNcpZbbH1KLR9GuFp5OvW04ENZs9Rn22HgwoZyuGgfnIYNEIq1OgWrH50SJg==",
"dev": true
},
"@freesewing/plugin-bundle": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-bundle/-/plugin-bundle-0.8.0.tgz",
"integrity": "sha512-uz6YVo3sP+MW/0n+ZDuNkfbUDiLFF0wkP+knPy/KETYg+JqD3DLqqBgTe8zMf71BQyHc5XGb5CAMY164aDqPaQ==",
"requires": {
"@freesewing/plugin-cutonfold": "0.10.4",
"@freesewing/plugin-dimension": "0.7.3",
"@freesewing/plugin-grainline": "0.2.2",
"@freesewing/plugin-logo": "0.5.2",
"@freesewing/plugin-round": "0.3.0",
"@freesewing/plugin-scalebox": "0.3.1",
"@freesewing/plugin-sprinkle": "0.1.0",
"@freesewing/plugin-title": "0.10.0"
}
},
"@freesewing/plugin-cutonfold": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-cutonfold/-/plugin-cutonfold-0.10.4.tgz",
"integrity": "sha512-MTQ3LIJsuh2JdbEOzC9/w0n6AMNhN45aOYhp7iHKb/PUGy25L1iINYOuuzljLHTqYAgYIoFuCeVf9tw78hnzKA=="
},
"@freesewing/plugin-debug": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-debug/-/plugin-debug-0.5.2.tgz",
@ -298,53 +294,18 @@
"integrity": "sha512-t5A21GZlLiknEr5LAXmhsay8bobgE6Mrjxe11PMczGV1rZKWZPM9/Cj1iD1hSmuuLuER8MsMk4KfJVHst9hOFA==",
"dev": true
},
"@freesewing/plugin-dimension": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-dimension/-/plugin-dimension-0.7.3.tgz",
"integrity": "sha512-F0x+zARVNd2l3IX/sK0UmH2+Y/Mw2rKwZD8eLKWBfq0zCaC3WGHmd4TzlnE0oxQpiDejAYbsliFGm0vLPQyVMg=="
},
"@freesewing/plugin-grainline": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-grainline/-/plugin-grainline-0.2.2.tgz",
"integrity": "sha512-VN9Qks1vL8MswqwiqOAtSguKyXjaVI258xqTA/9t76NYJsidm2HxRQxUnxcA+xg5MzOahSSRtVAWdXuAwV31ig=="
},
"@freesewing/plugin-i18n": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-i18n/-/plugin-i18n-0.1.2.tgz",
"integrity": "sha512-z/23gJ67gw9xSd3+pIsbeP8mR0tSbPkBs5i+1JhSRwafD2gx6Q3vssRxm4kzFDoTLwJpMvyH7qkhqGmlzZNpaQ==",
"dev": true
},
"@freesewing/plugin-logo": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-logo/-/plugin-logo-0.5.2.tgz",
"integrity": "sha512-g+lk/nBYxnzs7hQYUdQ/YDPJCUmUeZcNdk0+xUWoADdoZY95NwrXVxfNz/O2wI9kRCgFpFojgT0dD2HKtkv0/w=="
},
"@freesewing/plugin-round": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-round/-/plugin-round-0.3.0.tgz",
"integrity": "sha512-qlyQ/kC1MYZfDus4SI1gOkyXx3tyG2V0/zsjtYH9rW4SnwarzQMgUwRYN87DmPszrqGqIgVZmhTatW7dz3LhCg=="
},
"@freesewing/plugin-scalebox": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-scalebox/-/plugin-scalebox-0.3.1.tgz",
"integrity": "sha512-iZwWVQdLGs/cPVZl4ZyBMzNrIUzDRWyhScBg9D62UGuBIPdGFmA1fDEgZ+5hDJ9UuxR65/Ue1emJlOlP2ZwOtw=="
},
"@freesewing/plugin-sprinkle": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-sprinkle/-/plugin-sprinkle-0.1.0.tgz",
"integrity": "sha512-u/tm8sgW5h2RlvGPhyCG4KUb1GhTMwuTkOotgdsevZr9fx3aApDUmZhe2mfmJhvKvgQGaa6IOQJ69OJ402oOCg=="
},
"@freesewing/plugin-theme": {
"version": "0.18.4",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-theme/-/plugin-theme-0.18.4.tgz",
"integrity": "sha512-5HZWqxgLbQETdOc2Ph/Mc8C9s8qFfCPZjfW+GYE6vwkJ3viCARIGp4iFSZtF5f5GaUKW91SAZKTu7AgRGKg+lg==",
"dev": true
},
"@freesewing/plugin-title": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-title/-/plugin-title-0.10.0.tgz",
"integrity": "sha512-UZYge58Cofpgjx7ODhdszTKYRURjVtP2YIkOsUR3/kzicVpAw/wuoFX9n85y9IGG+k9ImIX7/7F4AtqlhNItnQ=="
},
"@freesewing/plugin-validate": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@freesewing/plugin-validate/-/plugin-validate-0.4.1.tgz",
@ -818,16 +779,6 @@
}
}
},
"bezier-js": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/bezier-js/-/bezier-js-2.3.2.tgz",
"integrity": "sha512-+G6FB5YuicjLvYP2ZPrzGs1vXjkO6uONehOkjvIvoueIeyPxMWjgSS8DX+OYsx8xzrDDi56v2CqAxHU/NTu3LQ=="
},
"bin-pack": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bin-pack/-/bin-pack-1.0.2.tgz",
"integrity": "sha1-wqAU7b8L7XCjKSBi7UZXe5YSBnk="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@ -1484,15 +1435,6 @@
"map-cache": "^0.2.2"
}
},
"freesewing": {
"version": "0.30.6",
"resolved": "https://registry.npmjs.org/freesewing/-/freesewing-0.30.6.tgz",
"integrity": "sha512-iacKTnjNCzMyMcIfutMm7UHO51ewgtpZ5TTkL7gho0nZyAvjdwreNw5yrEej73nhr7zobGQqOijw+z3JdPNQ8w==",
"requires": {
"bezier-js": "2.3.2",
"bin-pack": "1.0.2"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",

View file

@ -18,7 +18,6 @@
],
"main": "dist/index.js",
"module": "dist/index.mjs",
"unpkg": "dist/browser.js",
"scripts": {
"precommit": "npm run pretty && lint-staged",
"patch": "npm version patch -m ':bookmark: v%s' && npm run build",
@ -27,12 +26,10 @@
"test": "echo \"Error: no test specified\" && exit 1",
"clean": "rimraf dist",
"pretty": "npx prettier --write \"src/*.js\"",
"watch": "nodemon -w src --exec npm run browserbuild",
"browserbuild": "rollup -c rollup.js -o dist/browser.js -f iife -m true -n freesewing_patterns_brian --footer 'freesewing.patterns.brian = freesewing_patterns_brian;'",
"nodebuild": "rollup -c rollup.js -o dist/index.js -f cjs -m true",
"modulebuild": "rollup -c rollup.js -o dist/index.mjs -f es -m true",
"nodebuild": "rollup -c -o dist/index.js -f cjs",
"modulebuild": "rollup -c -o dist/index.mjs -f es",
"rebuild": "npm run nodebuild && npm run modulebuild",
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
"build": "npm run clean && npm run nodebuild && npm run modulebuild"
},
"husky": {
"hooks": {
@ -45,9 +42,9 @@
"git add"
]
},
"dependencies": {
"peerDependencies": {
"@freesewing/plugin-bundle": "0.8.0",
"freesewing": "0.30.6"
"freesewing": "^0.31"
},
"devDependencies": {
"@babel/core": "7.3.3",
@ -73,5 +70,8 @@
"README.md",
"package-lock.json",
"package.json"
]
],
"dependencies": {
"@babel/plugin-proposal-object-rest-spread": "7.4.3"
}
}

View file

@ -2,25 +2,25 @@ 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/**" }),
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 */`
})
],
external: ["freesewing", "@freesewing/plugin-bundle"],
output: {
globals: {
freesewing: "freesewing",
"@freesewing/plugin-bundle": "freesewing.plugins.bundle"
}
}
]
};