Skip to content

Commit

Permalink
Bug IET-OU#41, add compress/minify Javascript step to build script
Browse files Browse the repository at this point in the history
* Note, '.min.js' file ignored by Git;
* .. Plus, move 'husky' to 'peerDependencies' [iet:10364720][ci skip]
  • Loading branch information
nfreear committed Oct 8, 2018
1 parent a0c2702 commit 17ca3e1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
.pa11yci*

node_modules/
package-lock.json
# package-lock.json
*BAK*
*.diff
*.log
*.tgz
/dropbox
*.html
!index.html
*.min.js

.DS_Store
.gitattributes
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -18,4 +18,8 @@ before_script: npm run build

# script: npm test

after_script:
- ls -al dist/
- git status

# End.
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 17ca3e1

Please sign in to comment.