1
0
Fork 0

release: v2.1.7

This commit is contained in:
Joost De Cock 2019-12-15 14:12:29 +01:00
parent dfaa8694ba
commit 633dd8521b
125 changed files with 4078 additions and 4495 deletions

View file

@ -1,31 +1,23 @@
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 peerDepsExternal from "rollup-plugin-peer-deps-external";
import {
version,
name,
description,
author,
license,
main,
module
} from "./package.json";
import fs from "fs";
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 peerDepsExternal from 'rollup-plugin-peer-deps-external'
import minify from 'rollup-plugin-babel-minify'
import { version, name, description, author, license, main, module } from './package.json'
import fs from 'fs'
export default {
input: "src/index.js",
input: 'src/index.js',
output: [
{
file: main,
format: "cjs",
format: 'cjs',
sourcemap: true
},
{
file: module,
format: "es",
format: 'es',
sourcemap: true
}
],
@ -34,20 +26,17 @@ export default {
resolve(),
json(),
babel({
exclude: "node_modules/**"
exclude: 'node_modules/**'
}),
sass({
output(styles, styleNodes) {
fs.writeFileSync(
"./src/bundle.css.js",
"export default `" + styles + "`;"
);
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 */`
}
minify({
comments: false,
sourceMap: true,
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
})
]
};
}