Skip to content

Commit

Permalink
Cleanup and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
discordier committed Jun 1, 2022
1 parent 747e0b7 commit 1f6d493
Show file tree
Hide file tree
Showing 4 changed files with 958 additions and 2,549 deletions.
3 changes: 1 addition & 2 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const path = require('path');
const zlib = require('zlib');
const rollup = require('rollup');
const uglify = require('uglify-js');
const uglifyEs = require('uglify-es');

if (!fs.existsSync('dist')) {
fs.mkdirSync('dist')
Expand Down Expand Up @@ -45,7 +44,7 @@ function buildEntry (config) {
const {output} = await bundle.generate(outConfig)
const code = output[0].code
if (isProd) {
let result = (/esm\.min$/.test(outConfig.file) ? uglify : uglifyEs).minify(code, {
let result = uglify.minify(code, {
mangle: {
// keep_classnames: true,
},
Expand Down
2 changes: 0 additions & 2 deletions build/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require('path');
const babel = require('@rollup/plugin-babel').default;
const replace = require('@rollup/plugin-replace');
const flow = require('rollup-plugin-flow-no-whitespace');
const version = process.env.VERSION || require('../package.json').version;

const banner =
Expand Down Expand Up @@ -96,7 +95,6 @@ function genConfig (opts) {
preventAssignment: true,
__VERSION__: version
}),
flow(),
babel({
babelHelpers: 'runtime',
shouldPrintComment: () => opts.env === 'development',
Expand Down
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
},
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.16.5",
"@babel/plugin-transform-runtime": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/register": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-replace": "^3.0.0",
"babel-cli": "^6.26.0",
"@rollup/plugin-replace": "^4.0.0",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"chai": "^4.3.4",
Expand All @@ -43,12 +43,9 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"mocha": "^10.0.0",
"path": "^0.12.7",
"rollup": "^2.61.1",
"rollup-plugin-flow-no-whitespace": "^1.0.0",
"uglify-es": "^3.3.10",
"uglify-js": "^3.14.5",
"watchify": "^4.0.0"
},
Expand Down
Loading

0 comments on commit 1f6d493

Please sign in to comment.