Added minified version.
This commit is contained in:
parent
d1efeeffa6
commit
b164de08a5
31
README.md
31
README.md
@ -1,8 +1,33 @@
|
||||
# iwmlib
|
||||
|
||||
## Install
|
||||
|
||||
Install the following dependencies globally
|
||||
|
||||
`npm i rollup gulp-cli -g`
|
||||
|
||||
and some dependencies locally
|
||||
|
||||
`npm i`
|
||||
|
||||
Be sure that Python 3 is installed on your system (for building the 3rd party library).
|
||||
|
||||
## Build
|
||||
|
||||
Be sure that Python 3 is installed (for building the 3rd party library) and that you have installed Rollupjs globally `npm i rollup -g`.
|
||||
To build the two iwmlib files type
|
||||
|
||||
`npm run build`
|
||||
|
||||
The files will be generated in the dist folder (iwmlib.js and iwmlib.pixi.js). If you want to watch the files for a continuously build type
|
||||
|
||||
`npm run watch`
|
||||
|
||||
To build the 3rd party library type
|
||||
|
||||
`npm run 3rdparty`
|
||||
|
||||
To create the minified version of the 3rd party library type
|
||||
|
||||
`npm run minify`
|
||||
|
||||
|
||||
To build the two iwmlib files type `npm run build`. The files will be generated in the dist folder (iwmlib.js and iwmlib.pixi.js). If you want to watch the files for a continuously build type `npm run watch`.
|
||||
To build the 3rd party library type `npm run 3rdparty`. The file will be generated in the dist folder (iwmlib.3rdparty.js).
|
||||
|
1
dist/iwmlib.3rdparty.min.js
vendored
Normal file
1
dist/iwmlib.3rdparty.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
14
gulpfile.js
Normal file
14
gulpfile.js
Normal file
@ -0,0 +1,14 @@
|
||||
const {src, dest, parallel} = require('gulp');
|
||||
const uglify = require('gulp-uglify');
|
||||
const rename = require('gulp-rename');
|
||||
|
||||
function minify() {
|
||||
return src([
|
||||
'dist/iwmlib.3rdparty.js'
|
||||
], {sourcemaps: false})
|
||||
.pipe(rename({extname: '.min.js'}))
|
||||
.pipe(uglify())
|
||||
.pipe(dest('dist'))
|
||||
}
|
||||
|
||||
exports.default = parallel(minify);
|
3534
package-lock.json
generated
3534
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,8 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "rollup --config ./rollup.config.js",
|
||||
"watch": "rollup --watch --config ./rollup.config.js",
|
||||
"3rdparty": "python3 ./lib/3rdparty/create_all_js.py"
|
||||
"3rdparty": "python3 ./lib/3rdparty/create_all_js.py",
|
||||
"minify": "gulp"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -18,5 +19,9 @@
|
||||
},
|
||||
"author": "",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"devDependencies": {}
|
||||
"devDependencies": {
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-uglify": "^3.0.2"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user