moy-fp
Version:
A functional programming library.
85 lines (83 loc) • 1.54 kB
JavaScript
import babel from 'rollup-plugin-babel';
import { uglify } from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
import replace from 'rollup-plugin-replace'
import { version } from '../package.json'
const banner =
`/**
* moy-fp v${version}
* (jp) ${new Date().getFullYear()} murakami
* @license MIT
*/`
export default [
{
input: './src/index.js',
output:{
file: './dist/moy-fp.common.js',
format: 'umd',
name: 'M',
banner,
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
replace({
__VERSION__: version,
}),
],
},
{
input: './src/index.js',
output:{
file: './dist/moy-fp.common.min.js',
format: 'umd',
name: 'M',
banner,
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
uglify(),
replace({
__VERSION__: version,
}),
],
},
{
input: './src/index.js',
output:{
file: './dist/moy-fp.esm.js',
format: 'es',
name: 'M',
banner,
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
replace({
__VERSION__: version,
}),
],
},
{
input: './src/index.js',
output:{
file: './dist/moy-fp.esm.min.js',
format: 'es',
name: 'M',
banner,
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
uglify({},minify),
// replace({
// __VERSION__: version,
// }),
],
},
]