Proposal to remove generated code from being versioned (#89)

* Ignore changes made to index.html by creating a sample file

* Ignore generated files

* Use the correct order for the dev deps

* Copy "index.html" when necessary

Since we won't want to version generated code.

* fixup! Ignore generated files
This commit is contained in:
thomas
2018-06-19 18:06:59 +02:00
committed by Tom MacWright
parent bd0115f70a
commit 43f7f54a78
3 changed files with 8 additions and 2 deletions

View File

@ -4,12 +4,14 @@
"description": "an api documentation website",
"main": "index.js",
"scripts": {
"gen-index": "cpy --no-overwrite index.html.sample --rename=index.html .",
"postinstall": "npm run gen-index",
"start": "budo src/index.js --serve=bundle.js --live",
"release": "standard-version",
"test": "npm run test-unit && eslint src && npm run prerender -- /dev/null && rm -rf lib",
"test-unit": "mocha --compilers js:babel-register test",
"prerender": "babel src --out-dir lib && node lib/render.js",
"build": "cross-env NODE_ENV=production browserify src/index.js | uglifyjs -c -m > bundle.js && npm run prerender -- index.html"
"build": "npm run gen-index && cross-env NODE_ENV=production browserify src/index.js | uglifyjs -c -m > bundle.js && npm run prerender -- index.html"
},
"browserify": {
"transform": [
@ -56,11 +58,12 @@
"devDependencies": {
"babel-register": "^6.3.13",
"budo": "^11.0.0",
"cpy-cli": "^2.0.0",
"cross-env": "^5.1.6",
"cz-conventional-changelog": "2.1.0",
"standard-version": "^4.4.0",
"expect": "^23.0.1",
"mocha": "^5.0.0",
"standard-version": "^4.4.0",
"to-vfile": "^4.0.0",
"uglify-js": "^3.0.27"
},