Add jsdoc to package json and test/build tasks

This commit is contained in:
Paul Kaplan 2018-07-31 09:00:19 -04:00
parent c7db7ad086
commit 5a429d90be
2 changed files with 25 additions and 2 deletions

20
.jsdoc.json Normal file
View File

@ -0,0 +1,20 @@
{
"plugins": ["plugins/markdown"],
"templates": {
"default": {
"includeDate": false,
"outputSourceFiles": false
}
},
"source": {
"include": ["src"]
},
"opts": {
"destination": "playground/docs",
"pedantic": true,
"private": true,
"readme": "README.md",
"recurse": true,
"template": "node_modules/docdash"
}
}

View File

@ -12,9 +12,10 @@
"main": "./dist/node/scratch-vm.js",
"browser": "./src/index.js",
"scripts": {
"build": "webpack --progress --colors --bail",
"build": "npm run docs && webpack --progress --colors --bail",
"coverage": "tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov",
"deploy": "touch playground/.nojekyll && gh-pages -t -d playground -m \"Build for $(git log --pretty=format:%H -n1)\"",
"docs": "jsdoc -c .jsdoc.json",
"extract:core": "mkdirp translations/core && format-message extract --out-file translations/core/en.json src/extensions/**/index.js",
"i18n:src": "npm run extract:core",
"lint": "eslint . && format-message lint src/**/*.js",
@ -23,7 +24,7 @@
"tap": "tap ./test/{unit,integration}/*.js",
"tap:unit": "tap ./test/unit/*.js",
"tap:integration": "tap ./test/integration/*.js",
"test": "npm run lint && npm run tap",
"test": "npm run lint && npm run docs && npm run tap",
"watch": "webpack --progress --colors --watch",
"version": "json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
},
@ -54,6 +55,7 @@
"babel-loader": "^7.0.0",
"babel-preset-env": "^1.6.1",
"copy-webpack-plugin": "^4.5.1",
"docdash": "^0.4.0",
"eslint": "^5.0.1",
"eslint-config-scratch": "^5.0.0",
"expose-loader": "0.7.5",
@ -61,6 +63,7 @@
"format-message-cli": "5.2.1",
"gh-pages": "^1.1.0",
"in-publish": "^2.0.0",
"jsdoc": "^3.5.5",
"json": "^9.0.4",
"lodash.defaultsdeep": "4.6.0",
"pngjs": "^3.3.2",