🔧 Centrally confifured package and rollup files
This commit is contained in:
parent
74e8ef991c
commit
a3ff3a7462
147 changed files with 3196 additions and 273680 deletions
33
packages/plugin-theme/rollup.config.js
Normal file
33
packages/plugin-theme/rollup.config.js
Normal 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 */`
|
||||
}
|
||||
})
|
||||
]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue