1
0
Fork 0

🔧 Centrally confifured package and rollup files

This commit is contained in:
Joost De Cock 2019-04-19 17:31:44 +02:00
parent 74e8ef991c
commit a3ff3a7462
147 changed files with 3196 additions and 273680 deletions

View file

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