Skip to content

Commit

Permalink
MDL-77559 js: Revert "MDL-75012 js: Use our own jsdoc wrapper"
Browse files Browse the repository at this point in the history
This reverts commit 89f7402.
  • Loading branch information
andrewnicols committed Mar 9, 2023
1 parent f483380 commit 63ecbc5
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .grunt/tasks/jsdoc.js
Expand Up @@ -20,33 +20,17 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

module.exports = (grunt) => {
const path = require('path');

grunt.registerTask('jsdoc', 'Generate JavaScript documentation using jsdoc', function() {
const done = this.async();
const configuration = path.resolve('.grunt/jsdoc/jsdoc.conf.js');

grunt.util.spawn({
cmd: 'jsdoc',
args: [
'--configure',
configuration,
]
}, function(error, result, code) {
if (result.stdout) {
grunt.log.write(result.stdout);
}

if (result.stderr) {
grunt.log.error(result.stderr);
}
if (error) {
grunt.fail.fatal(`JSDoc failed with error code ${code}`);
} else {
grunt.log.write('JSDoc completed successfully'.green);
}
done();
});
module.exports = grunt => {
// Project configuration.
grunt.config.merge({
jsdoc: {
dist: {
options: {
configure: ".grunt/jsdoc/jsdoc.conf.js",
},
},
},
});

grunt.loadNpmTasks('grunt-jsdoc');
};
238 changes: 238 additions & 0 deletions npm-shrinkwrap.json

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

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -27,6 +27,7 @@
"grunt": "^1.6.1",
"grunt-contrib-watch": "1.1.0",
"grunt-eslint": "24.0.0",
"grunt-jsdoc": "^2.4.1",
"grunt-rollup": "^11.9.0",
"grunt-sass": "3.1.0",
"grunt-stylelint": "^0.18.0",
Expand Down

0 comments on commit 63ecbc5

Please sign in to comment.