diff options
author | Mario <mario@mariovavti.com> | 2020-01-11 10:30:12 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-01-11 10:30:12 +0000 |
commit | f645c6f3a57bf5f53bbb2bde362b2447f725c977 (patch) | |
tree | 9b37650aad46296c5d98a55969348ebb4ee2d097 /library/cropperjs/rollup.config.js | |
parent | 4c1c6908165e5c4fb1b7238f66764f89faa2301a (diff) | |
download | volse-hubzilla-f645c6f3a57bf5f53bbb2bde362b2447f725c977.tar.gz volse-hubzilla-f645c6f3a57bf5f53bbb2bde362b2447f725c977.tar.bz2 volse-hubzilla-f645c6f3a57bf5f53bbb2bde362b2447f725c977.zip |
update cropperjs to the recent version
Diffstat (limited to 'library/cropperjs/rollup.config.js')
-rw-r--r-- | library/cropperjs/rollup.config.js | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/library/cropperjs/rollup.config.js b/library/cropperjs/rollup.config.js index b792a79a7..437684a11 100644 --- a/library/cropperjs/rollup.config.js +++ b/library/cropperjs/rollup.config.js @@ -1,50 +1,45 @@ const babel = require('rollup-plugin-babel'); +const changeCase = require('change-case'); +const createBanner = require('create-banner'); const pkg = require('./package'); -const now = new Date(); -const banner = `/*! - * Cropper.js v${pkg.version} - * https://github.com/${pkg.repository} - * - * Copyright (c) 2015-${now.getFullYear()} ${pkg.author.name} - * Released under the ${pkg.license} license - * - * Date: ${now.toISOString()} - */ -`; +pkg.name = pkg.name.replace('js', ''); + +const name = changeCase.pascalCase(pkg.name); +const banner = createBanner({ + data: { + name: `${name}.js`, + year: '2015-present', + }, +}); module.exports = { - // Export banner for PostCSS - banner, - input: 'src/js/cropper.js', + input: 'src/index.js', output: [ { banner, - file: 'dist/cropper.js', + name, + file: `dist/${pkg.name}.js`, format: 'umd', - name: 'Cropper', }, { banner, - file: 'dist/cropper.common.js', + file: `dist/${pkg.name}.common.js`, format: 'cjs', }, { banner, - file: 'dist/cropper.esm.js', - format: 'es', + file: `dist/${pkg.name}.esm.js`, + format: 'esm', }, { banner, - file: 'docs/js/cropper.js', + name, + file: `docs/js/${pkg.name}.js`, format: 'umd', - name: 'Cropper', }, ], plugins: [ - babel({ - exclude: 'node_modules/**', - plugins: ['external-helpers'], - }), + babel(), ], }; |