Skip to content

Commit af80bda

Browse files
authored
Merge pull request #2518 from outofambit/npm-run-docs-dev
add `npm run docs:dev`
2 parents 99c35e1 + 8a407ad commit af80bda

File tree

3 files changed

+212
-0
lines changed

3 files changed

+212
-0
lines changed

Gruntfile.js

+13
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ module.exports = function(grunt) {
328328
}
329329
}
330330
},
331+
open: {
332+
yui: {
333+
path: 'http://0.0.0.0:9001/docs/reference/'
334+
}
335+
},
331336
'saucelabs-mocha': {
332337
all: {
333338
options: {
@@ -391,6 +396,7 @@ module.exports = function(grunt) {
391396
// Load the external libraries used.
392397
grunt.loadNpmTasks('grunt-contrib-compress');
393398
grunt.loadNpmTasks('grunt-contrib-connect');
399+
grunt.loadNpmTasks('grunt-open');
394400
grunt.loadNpmTasks('grunt-contrib-copy');
395401
grunt.loadNpmTasks('grunt-eslint');
396402
grunt.loadNpmTasks('grunt-contrib-watch');
@@ -433,6 +439,13 @@ module.exports = function(grunt) {
433439
grunt.registerTask('test:nobuild', ['eslint:test', 'connect', 'mocha']);
434440
grunt.registerTask('yui', ['yuidoc:prod', 'minjson', 'typescript']);
435441
grunt.registerTask('yui:test', ['yuidoc:prod', 'connect', 'mocha:yui']);
442+
grunt.registerTask('yui:dev', [
443+
'yui:prod',
444+
'browserify',
445+
'connect',
446+
'open:yui',
447+
'watch:yui'
448+
]);
436449
grunt.registerTask('default', ['test']);
437450
grunt.registerTask('saucetest', ['connect', 'saucelabs-mocha']);
438451
};

package-lock.json

+197
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"grunt": "grunt",
99
"build": "grunt build",
1010
"docs": "grunt yui",
11+
"docs:dev": "grunt yui:dev",
1112
"test": "grunt",
1213
"lint": "grunt lint-no-fix",
1314
"lint:fix": "grunt lint-fix",
@@ -68,6 +69,7 @@
6869
"grunt-mocha": "^1.0.4",
6970
"grunt-mocha-test": "^0.12.7",
7071
"grunt-newer": "^1.1.0",
72+
"grunt-open": "^0.2.3",
7173
"grunt-release-it": "^1.0.1",
7274
"grunt-saucelabs": "8.6.1",
7375
"grunt-update-json": "^0.2.1",

0 commit comments

Comments
 (0)