feat(rollup): Initial the configuration file

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2020-02-13 17:36:19 +04:00
parent 443af8609f
commit 34d55a2162
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3
3 changed files with 31 additions and 3 deletions

2
.gitignore vendored
View File

@ -198,4 +198,4 @@ $RECYCLE.BIN/
### Project ### ### Project ###
# Resulting code # Resulting code
/*.js /javascript.js

28
rollup.config.js Normal file
View File

@ -0,0 +1,28 @@
import { terser } from "rollup-plugin-terser";
import json from "@rollup/plugin-json";
import typescript from "@rollup/plugin-typescript";
module.exports = {
input: {
javascript: "src/javascript.ts",
},
output: {
dir: ".",
entryFileNames: "[name].js",
format: "cjs",
},
plugins: [
json({
compact: true,
namedExports: false,
}),
typescript(),
terser({
compress: true,
output: {
comments: false,
},
sourcemap: false,
}),
],
};

View File

@ -1,6 +1,6 @@
import rules from "./rules/eslint.json"; import eslint from "./rules/eslint.json";
module.exports = { module.exports = {
"extends": ["eslint:all"], "extends": ["eslint:all"],
"rules": { ...rules } "rules": { ...eslint },
}; };