Bundling and release prep

This commit is contained in:
Bán Dénes 2020-09-27 15:11:22 +02:00
parent a3661e3752
commit 6a0feae9ad
6 changed files with 196 additions and 90 deletions

View file

@ -1,16 +1,24 @@
import pkg from './package.json'
import commonjs from '@rollup/plugin-commonjs'
import replace from '@rollup/plugin-replace'
export default {
input: 'src/ergogen.js',
external: ['makerjs', 'js-yaml'],
output: {
name: 'ergogen',
file: 'dist/bundle.js',
file: 'dist/ergogen.js',
format: 'umd',
banner: `/*!\n * ergogen v${pkg.version}\n * https://zealot.hu/ergogen\n */\n`,
globals: {
'makerjs': 'makerjs',
'js-yaml': 'jsyaml'
}
},
plugins: [commonjs()]
plugins: [
commonjs(),
replace({
__ergogen_version: pkg.version
})
]
}