Files
svgedit/packages/svgcanvas/rollup.config.js
JFH 43bf93968a separate svgcanvas from svgedit
now you can use directlt svgcanvas. see readme.md

* configure workspaces
* move svgcanvas to packages folder
* move utils to common and paint to svgcanvas
* make svgcanvas a dependency of svgedit
* update deps
* workspaces requires npm 7 at least so the ci needs a new node version
* update github actions to V3
* update snapshots using custom svg exports
* remove unmaintained cypress snapshot plugin
* new github action to add coverage in PR
* Update onpushandpullrequest.yml
* svgcanvas v7.1.6
2022-08-14 15:01:51 +02:00

39 lines
1.1 KiB
JavaScript

/* eslint-env node */
// This rollup script is run by the command:
// 'npm run build'
import rimraf from 'rimraf'
import babel from '@rollup/plugin-babel'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
// import progress from 'rollup-plugin-progress';
import filesize from 'rollup-plugin-filesize'
// remove existing distribution
rimraf('./dist', () => console.info('recreating dist'))
// config for svgedit core module
const config = [{
input: ['./svgcanvas.js'],
output: [
{
format: 'es',
inlineDynamicImports: true,
sourcemap: true,
file: 'dist/svgcanvas.js'
}
],
plugins: [
nodeResolve({
browser: true,
preferBuiltins: false
}),
commonjs(),
babel({ babelHelpers: 'bundled', exclude: [/\/core-js\//] }), // exclude core-js to avoid circular dependencies.
terser({ keep_fnames: true }), // keep_fnames is needed to avoid an error when calling extensions.
filesize()
]
}]
export default config