diff --git a/.gitignore b/.gitignore index 21afe65..f8afc63 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .pa11yci* node_modules/ -package-lock.json +# package-lock.json *BAK* *.diff *.log @@ -10,6 +10,7 @@ package-lock.json /dropbox *.html !index.html +*.min.js .DS_Store .gitattributes diff --git a/.travis.yml b/.travis.yml index f1c0817..44a0fb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/ +# Travis-CI ~ https://docs.travis-ci.com/user/languages/javascript-with-nodejs/ language: node_js @@ -18,4 +18,8 @@ before_script: npm run build # script: npm test +after_script: + - ls -al dist/ + - git status + # End. diff --git a/package-lock.json b/package-lock.json index d12c128..5d743bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1375,6 +1375,12 @@ "glob": "7.1.3" } }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4389,6 +4395,10 @@ } } }, + "pa11y-config": { + "version": "git+https://github.com/nfreear/pa11y-config.git#1af31dc9741eedadd94159b36747cfdc50604b91", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -6249,6 +6259,12 @@ } } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "stringify": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/stringify/-/stringify-5.2.0.tgz", @@ -6453,6 +6469,16 @@ "is-utf8": "0.2.1" } }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "2.13.0", + "source-map": "0.6.1" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index b0dcaa9..b4e6e20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "our-journey", - "description": "Our Journey interactive. | © 2018 The Open University (IET-OU).", + "description": "Our Journey interactive student journey creator. | © 2018 The Open University (IET-OU).", "version": "1.3.4", "license": "GPL-3.0+", "main": "index.js", @@ -33,17 +33,21 @@ "engines": { "node": ">= 6" }, + "dependencies": {}, "devDependencies": { "bannerize": "^1.1.3", "browserify": "^16.2.2", "browserify-versionify": "^1.0.6", - "husky": "^1.0.0-rc.14", "lint": "^1.1.2", "live-server": "^1.2.0", "pa11y-ci": "^1.3.1", "pa11y-config": "git+https://github.com/nfreear/pa11y-config.git", "semistandard": "^12.0.1", - "stringify": "^5.2.0" + "stringify": "^5.2.0", + "uglify-es": "^3.3.9" + }, + "peerDependencies": { + "husky": "^1.0.0-rc.14" }, "husky": { "hooks": { @@ -92,8 +96,8 @@ ] }, "scripts": { - "add-hook": "# cp _git-hook/pre-commit.sh .git/hooks/pre-commit # Deprecated!", - "build": "browserify --no-bf -r ./index.js:our-journey > dist/our-journey.js && bannerize dist/* -b src/banner.ejs", + "build": "browserify --no-bf -r ./index.js:our-journey > dist/our-journey.js && npm run uglify", + "uglify": "uglifyjs dist/*y.js -mco dist/our-journey.min.js && bannerize dist/* -b src/banner.ejs", "x-pa11yci-2x-preinstall": "export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 # A hack!", "start": "live-server --port=9000", "fix": "semistandard --fix",