Skip to content

Commit

Permalink
Patch 88 (#89)
Browse files Browse the repository at this point in the history
* Update model.js

* Update package.json

* Add browserify
  • Loading branch information
Quantalabs authored Jul 24, 2021
1 parent 3304079 commit 2c6c082
Show file tree
Hide file tree
Showing 8 changed files with 1,002 additions and 661 deletions.
4 changes: 2 additions & 2 deletions EpiJS/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class Model {
* model.get_data(100) // Get data for 100 days.
*/
get_data (time) { // skipcq: JS-0045
key = this.key
newkey = key
var key = this.key
var newkey = key

for (var x = 0; x<time; x++) {
var y; // skipcq: JS-0119
Expand Down
1,568 changes: 948 additions & 620 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "@quantalabs/epijs",
"version": "1.3.1",
"version": "1.3.2",
"description": "A disease modeling package.",
"main": "EpiJS/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "bash scripts/doc.sh",
"docs:build": "documentation build EpiJS/pre.js -f md > docs/pre.md && documentation build EpiJS/com.js -f md > docs/com.md && cd scripts && python doc-update.py && cd .. && vuepress build docs"
"docs:build": "documentation build EpiJS/pre.js -f md > docs/pre.md && documentation build EpiJS/com.js -f md > docs/com.md && cd scripts && python doc-update.py && cd .. && vuepress build docs",
"build": "bash scripts/min.sh"
},
"repository": {
"type": "git",
Expand All @@ -24,11 +25,11 @@
},
"homepage": "epi.js.org",
"devDependencies": {
"browserify": "^17.0.0",
"documentation": "^13.2.5",
"mocha": "^9.0.0",
"vuepress": "^1.8.2",
"webpack": "^4.46.0",
"webpack-cli": "^4.7.2"
"terser": "^4.8.0",
"vuepress": "^1.8.2"
},
"dependencies": {
"chart.js": "^3.0.2",
Expand Down
6 changes: 6 additions & 0 deletions scripts/min.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
browserify EpiJS --s EpiJS -o web/index.js
cd web
cat funcs.js >> index.js
cd ..
terser ./web/index.js --keep-classnames --keep-fnames --compress -o ./web/index.min.js # Minify Browserify Output
rm -rf ./web/index.js # Force remove output
11 changes: 11 additions & 0 deletions web/funcs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

let sir = EpiJS.pre.sir
let seir = EpiJS.pre.seir
let seird = EpiJS.pre.seird
let seihrd = EpiJS.pre.seihrd
let seihcrd = EpiJS.pre.seihcrd
let Virus = EpiJS.com.Virus
let Community = EpiJS.com.Community
let compare = EpiJS.com.compare
let Idiom = EpiJS.comp.Idiom
let Model = EpiJS.model.Model
31 changes: 29 additions & 2 deletions web/index.min.js

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions web/index.min.js.LICENSE.txt

This file was deleted.

11 changes: 0 additions & 11 deletions webpack.config.js

This file was deleted.

0 comments on commit 2c6c082

Please sign in to comment.