1
0
Fork 0
mirror of https://github.com/eosswedenorg/apt synced 2026-06-16 04:34:56 +02:00

npm: use webpack instead of upglify-js.

This commit is contained in:
Henrik Hautakoski 2022-01-24 18:04:02 +01:00
parent 350e7d638c
commit 6ec642b039
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
5 changed files with 2291 additions and 28 deletions

View file

@ -61,6 +61,7 @@ exclude:
- Gemfile.lock
- package.json
- package-lock.json
- webpack.config.js
- vendor
- node_modules
- README.md

View file

@ -1,9 +1,2 @@
#!/usr/bin/env bash
UGLIFYJS=node_modules/uglify-js/bin/uglifyjs
SRC=_scripts/app.js
TARGET=assets/scripts.js
echo "UglifyJS: $SRC -> $TARGET"
$UGLIFYJS $SRC -c -m > $TARGET
npx webpack

2293
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,13 +3,13 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {},
"devDependencies": {
"uglify-js": "^3.6.9"
"webpack": "^5.67.0",
"webpack-cli": "^4.9.2"
},
"scripts": {
"build": "./_scripts/build.sh",
"start": "./_scripts/start.sh"
"start": "./_scripts/start.sh"
},
"repository": {
"type": "git",

10
webpack.config.js Normal file
View file

@ -0,0 +1,10 @@
const path = require('path');
module.exports = {
mode: 'production',
entry: './_scripts/app.js',
output: {
path: path.resolve(__dirname, 'assets'),
filename: 'scripts.js',
}
};