aboutsummaryrefslogtreecommitdiff
path: root/scripts/package.json
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package.json')
-rw-r--r--scripts/package.json17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/package.json b/scripts/package.json
index 890274e..1ec659e 100644
--- a/scripts/package.json
+++ b/scripts/package.json
@@ -4,14 +4,17 @@
"author": "luxagraf",
"description": "Compile JS for Notes app",
"main": "src/js/index.js",
+ "browserslist": "> 0.25%, not dead",
"scripts": {
"eslint": "eslint src/*.js --fix",
"babel": "mkdir -p tmp && babel src/*.js -d tmp",
"include": "cp src/lib/*.js tmp/",
- "uglify:local": "mkdir -p ../media/js && uglifyjs tmp/*.js -m -c -o ../media/js/main.min.js",
+ "concat": "mkdir -p ../media/js && uglifyjs tmp/*.js -m -b -o tmp/main.js",
+ "browserify": "cd tmp && browserify main.js -o main.pack.js",
+ "uglify:local": "uglifyjs tmp/main.pack.js -m -o ../media/js/main.min.js",
"uglify:deploy": "mkdir -p ../media/js && uglifyjs tmp/*.js -m -c drop_console=true -o ../media/js/main.min.js",
"cleanup": "rm -rf tmp",
- "build": "pnpm run babel && pnpm run include && pnpm run uglify:local && pnpm run cleanup",
+ "build": "pnpm run babel && pnpm run include && pnpm run concat && pnpm run browserify && pnpm run uglify:local && pnpm run cleanup",
"deploy": "pnpm run babel && pnpm run include && pnpm run uglify && pnpm run cleanup",
"watch": "watch 'pnpm run build' ."
},
@@ -19,6 +22,16 @@
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/preset-env": "^7.1.6",
+ "@babel/standalone": "^7.2.5",
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
+ "babel-plugin-transform-runtime": "^6.23.0",
+ "babelify": "^10.0.0",
+ "browserify": "^16.2.3",
+ "core-js": "^2.6.1",
"eslint": "^5.9.0"
+ },
+ "dependencies": {
+ "babel-polyfill": "^6.26.0",
+ "babel-runtime": "^6.26.0"
}
}