Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/194956
Change subject: build: Move pre/post 'doc' task into package.json
......................................................................
build: Move pre/post 'doc' task into package.json
Simplify logic by running jsduck from the command directly instead
of shelling out from Node.
Composer's syntax for this is nicer as it supports a script property
to be an array. In npm one uses pre* and post* instead.
Change-Id: Ic6cdc9ac1b266a64dcb1522ac36132c5ef844d3c
---
M Gruntfile.js
M package.json
2 files changed, 3 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/56/194956/1
diff --git a/Gruntfile.js b/Gruntfile.js
index 61f63b5..904302f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -385,17 +385,6 @@
} );
} );
- grunt.registerTask( 'jsduck', function () {
- var done = this.async(),
- spawn = require( 'child_process' ).spawn,
- jsduck = spawn( 'jsduck', [ '--color' ] );
- jsduck.stdout.pipe( process.stdout );
- jsduck.stderr.pipe( process.stderr );
- jsduck.on( 'close', function ( code ) {
- done( code === 0 );
- } );
- } );
-
grunt.registerTask( 'build-code', [ 'concat:js', 'uglify' ] );
grunt.registerTask( 'build-styling', [
'copy:lessTemp', 'colorizeSvg', 'less', 'copy:svg',
'copy:imagesCommon',
@@ -419,7 +408,6 @@
grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'csslint', 'banana' ] );
grunt.registerTask( 'test', [ 'pre-test', 'git-build', 'lint',
'karma:main', 'karma:other' ] );
- grunt.registerTask( 'doc', [ 'jsduck', 'copy:jsduck' ] );
grunt.registerTask( 'default', 'test' );
};
diff --git a/package.json b/package.json
index 040a083..01450174 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,9 @@
],
"scripts": {
"test": "grunt test",
- "doc": "grunt build doc",
+ "predoc": "grunt build",
+ "doc": "jsduck",
+ "postdoc": "grunt copy:jsduck",
"prepublish": "grunt build"
},
"dependencies": {},
--
To view, visit https://gerrit.wikimedia.org/r/194956
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6cdc9ac1b266a64dcb1522ac36132c5ef844d3c
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits