Skip to content

Commit

Permalink
Use jsdoc cli directly. Use package.json in doc. Update release script.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Dec 13, 2020
1 parent 64a1453 commit bedc7f6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 27 deletions.
13 changes: 0 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,6 @@ module.exports = function (grunt) {
}
}
},
jsdoc: {
dist: {
src: ['src/**/*.js', 'tests/**/*.js', 'resources/doc/readme-doc.md'],
options: {
destination: 'build/doc',
template: 'node_modules/docdash',
configure: 'resources/doc/jsdoc.conf.json',
tutorials: 'resources/doc/tutorials'
}
}
},
copy: {
main: {
files: [
Expand Down Expand Up @@ -122,14 +111,12 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-karma');

// tasks
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('test', ['karma:unit']);
grunt.registerTask('test-ci', ['karma:ci']);
grunt.registerTask('build', ['concat', 'uglify']);
grunt.registerTask('doc', ['jsdoc']);
grunt.registerTask('dev', ['watch:build']);
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"grunt-contrib-watch": "~1.1.0",
"grunt-coveralls": "~2.0.0",
"grunt-eslint": "~23.0.0",
"grunt-jsdoc": "~2.4.0",
"grunt-karma": "~4.0.0",
"http-server": "^0.12.3",
"jsdoc": "3.6.6",
"karma": "~4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "^2.0.2",
Expand All @@ -50,7 +50,7 @@
"test": "grunt test",
"test-ci": "grunt test-ci",
"build": "grunt build",
"doc": "grunt doc",
"doc": "jsdoc -c resources/doc/jsdoc-conf.js",
"dev": "grunt dev",
"gren": "gren"
}
Expand Down
15 changes: 14 additions & 1 deletion resources/doc/jsdoc.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
"plugins": ["node_modules/jsdoc/plugins/markdown"],
"markdown": {
"idInHeadings": true
},
"source": {
"include": [
"src",
"tests"
]
},
"opts": {
"recurse": true,
"readme": "resources/doc/readme-doc.md",
"destination": "build/doc",
"template": "node_modules/docdash",
"tutorials": "resources/doc/tutorials",
"package": "package.json"
}

}
3 changes: 2 additions & 1 deletion resources/scripts/update-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/ivmartel/dwv.
# clean up
rm -Rf $HOME/gh-pages/doc/stable/*
# copy doc
cp -Rf $HOME/build/ivmartel/dwv/build/doc $HOME/gh-pages/doc/stable
cp -Rf $HOME/build/ivmartel/dwv/build/doc/dwv/* $HOME/gh-pages/doc/
cp -Rf $HOME/build/ivmartel/dwv/build/doc/dwv/* $HOME/gh-pages/doc/stable
# move to root of repo
cd $HOME/gh-pages
# add, commit and push files
Expand Down
12 changes: 2 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0"
which "^1.2.9"

cross-spawn@^7.0.1, cross-spawn@^7.0.2:
cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down Expand Up @@ -2498,14 +2498,6 @@ grunt-eslint@~23.0.0:
chalk "^4.0.0"
eslint "^7.0.0"

grunt-jsdoc@~2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/grunt-jsdoc/-/grunt-jsdoc-2.4.1.tgz#2ba3eb98a058af82d74623ebd0f5bcac38991813"
integrity sha512-S0zxU0wDewRu7z+vijEItOWe/UttxWVmvz0qz2ZVcAYR2GpXjsiski2CAVN0b18t2qeVLdmxZkJaEWCOsKzcAw==
dependencies:
cross-spawn "^7.0.1"
jsdoc "^3.6.3"

grunt-karma@~4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/grunt-karma/-/grunt-karma-4.0.0.tgz#faaeaff37ee71ebd75313da4cec1268500d51190"
Expand Down Expand Up @@ -3322,7 +3314,7 @@ jsbn@~0.1.0:
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=

jsdoc@^3.6.3:
jsdoc@3.6.6:
version "3.6.6"
resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-3.6.6.tgz#9fe162bbdb13ee7988bf74352b5147565bcfd8e1"
integrity sha512-znR99e1BHeyEkSvgDDpX0sTiTu+8aQyDl9DawrkOGZTTW8hv0deIFXx87114zJ7gRaDZKVQD/4tr1ifmJp9xhQ==
Expand Down

0 comments on commit bedc7f6

Please sign in to comment.