2018-08-14 10:22:48 +02:00
|
|
|
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 path from "path";
|
|
|
|
import { name, version, description, author, license } from "./package.json";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
input: "src/index.js",
|
|
|
|
plugins: [
|
|
|
|
resolve({
|
|
|
|
browser: true
|
|
|
|
}),
|
|
|
|
json(),
|
|
|
|
commonjs(),
|
|
|
|
babel({
|
|
|
|
exclude: "node_modules/**"
|
2019-01-27 12:56:01 +01:00
|
|
|
}),
|
|
|
|
terser({
|
|
|
|
output: {
|
|
|
|
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
|
|
}
|
2018-08-14 10:22:48 +02:00
|
|
|
})
|
|
|
|
],
|
|
|
|
external: ["freesewing", "@freesewing/plugin-bundle"],
|
|
|
|
output: {
|
|
|
|
globals: {
|
|
|
|
freesewing: "freesewing",
|
|
|
|
"@freesewing/plugin-bundle": "freesewing.plugins.bundle"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|