mirror of
https://github.com/eosswedenorg/apt
synced 2026-07-03 11:53:42 +02:00
npm: use webpack instead of upglify-js.
This commit is contained in:
parent
350e7d638c
commit
6ec642b039
5 changed files with 2291 additions and 28 deletions
|
|
@ -61,6 +61,7 @@ exclude:
|
||||||
- Gemfile.lock
|
- Gemfile.lock
|
||||||
- package.json
|
- package.json
|
||||||
- package-lock.json
|
- package-lock.json
|
||||||
|
- webpack.config.js
|
||||||
- vendor
|
- vendor
|
||||||
- node_modules
|
- node_modules
|
||||||
- README.md
|
- README.md
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,2 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
npx webpack
|
||||||
UGLIFYJS=node_modules/uglify-js/bin/uglifyjs
|
|
||||||
|
|
||||||
SRC=_scripts/app.js
|
|
||||||
TARGET=assets/scripts.js
|
|
||||||
|
|
||||||
echo "UglifyJS: $SRC -> $TARGET"
|
|
||||||
$UGLIFYJS $SRC -c -m > $TARGET
|
|
||||||
|
|
|
||||||
2291
package-lock.json
generated
2291
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -3,9 +3,9 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"uglify-js": "^3.6.9"
|
"webpack": "^5.67.0",
|
||||||
|
"webpack-cli": "^4.9.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "./_scripts/build.sh",
|
"build": "./_scripts/build.sh",
|
||||||
|
|
|
||||||
10
webpack.config.js
Normal file
10
webpack.config.js
Normal 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',
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue