aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/rollup.config.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /library/cropperjs/rollup.config.js
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.gz
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.bz2
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'library/cropperjs/rollup.config.js')
-rw-r--r--library/cropperjs/rollup.config.js45
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(),
],
};