diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | rollup.config.js | 28 | ||||
-rw-r--r-- | src/javascript.ts | 4 |
3 files changed, 31 insertions, 3 deletions
@@ -198,4 +198,4 @@ $RECYCLE.BIN/ ### Project ### # Resulting code -/*.js +/javascript.js diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..dcf90bf --- /dev/null +++ b/rollup.config.js @@ -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, + }), + ], +}; diff --git a/src/javascript.ts b/src/javascript.ts index d19c8d5..f5775d4 100644 --- a/src/javascript.ts +++ b/src/javascript.ts @@ -1,6 +1,6 @@ -import rules from "./rules/eslint.json"; +import eslint from "./rules/eslint.json"; module.exports = { "extends": ["eslint:all"], - "rules": { ...rules } + "rules": { ...eslint }, }; |