mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 00:58:44 +00:00
build: Move pre/post 'doc' task into package.json
Standard entry point. Change-Id: Ic6cdc9ac1b266a64dcb1522ac36132c5ef844d3c
This commit is contained in:
parent
92fca62022
commit
1082249691
|
@ -8,6 +8,7 @@
|
|||
module.exports = function ( grunt ) {
|
||||
var modules = grunt.file.readJSON( 'lib/ve/build/modules.json' );
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-contrib-copy' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
|
@ -72,6 +73,13 @@ module.exports = function ( grunt ) {
|
|||
banana: {
|
||||
all: 'modules/ve-{mw,wmf}/i18n/'
|
||||
},
|
||||
copy: {
|
||||
jsduck: {
|
||||
src: 'lib/ve/**/*',
|
||||
dest: 'docs/',
|
||||
expand: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files: [
|
||||
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# DEPRECATED: Use 'npm run-script doc' instead.
|
||||
#
|
||||
# This is kept as-is for back-compat with Jenkins jobs.
|
||||
# Don't forward to 'npm run-script' since Jenkins relies on it
|
||||
# being a symlink.
|
||||
#
|
||||
set -e
|
||||
cd $(dirname $0)/..
|
||||
jsduck
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"--title": "VisualEditor - Documentation",
|
||||
"--output": "docs",
|
||||
"--categories": ".jsduck/categories.json",
|
||||
"--eg-iframe": ".jsduck/eg-iframe.html",
|
||||
"--tags": ".jsduck/CustomTags.rb",
|
||||
"--warnings": ["-nodoc(class,public)"],
|
||||
"--builtin-classes": true,
|
||||
"--processes": "0",
|
||||
"--warnings-exit-nonzero": true,
|
||||
"--builtin-classes": true,
|
||||
"--external": "HTMLDocument,Window,Node,Set,Range,Selection,ClientRect,File,Blob,DataTransfer,DataTransferItem,KeyboardEvent,MouseEvent",
|
||||
"--output": "docs",
|
||||
"--warnings": ["-nodoc(class,public)"],
|
||||
"--": [
|
||||
".jsduck/external.js",
|
||||
"lib/ve/.jsduck/external.js",
|
||||
|
|
|
@ -4,11 +4,14 @@
|
|||
"private": true,
|
||||
"description": "Build tools for the VisualEditor-MediaWiki extension.",
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
"test": "grunt test",
|
||||
"doc": "jsduck",
|
||||
"postdoc": "grunt copy:jsduck"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.5",
|
||||
"grunt-banana-checker": "0.2.1",
|
||||
"grunt-contrib-copy": "0.8.0",
|
||||
"grunt-contrib-csslint": "0.4.0",
|
||||
"grunt-contrib-jshint": "0.11.0",
|
||||
"grunt-contrib-watch": "0.6.1",
|
||||
|
|
Loading…
Reference in a new issue