Browse Source

Added minified version.

obersalzberg
Sebastian Kupke 3 years ago
parent
commit
b164de08a5
5 changed files with 3583 additions and 6 deletions
  1. +28
    -3
      README.md
  2. +1
    -0
      dist/iwmlib.3rdparty.min.js
  3. +14
    -0
      gulpfile.js
  4. +3533
    -1
      package-lock.json
  5. +7
    -2
      package.json

+ 28
- 3
README.md View File

@ -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
- 0
dist/iwmlib.3rdparty.min.js
File diff suppressed because it is too large
View File


+ 14
- 0
gulpfile.js View 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);

+ 3533
- 1
package-lock.json
File diff suppressed because it is too large
View File


+ 7
- 2
package.json View File

@ -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…
Cancel
Save