File tree 3 files changed +10
-28
lines changed
3 files changed +10
-28
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
var gulp = require ( 'gulp' ) ;
3
- var shell = require ( 'gulp-shell' ) ;
4
3
var eslint = require ( 'gulp-eslint' ) ;
5
4
var jasmine = require ( 'gulp-jasmine' ) ;
6
- var isWin = / ^ w i n / . test ( process . platform ) ;
7
-
8
- gulp . task ( 'jsdoc' , shell . task ( [
9
- ( isWin ) ?
10
- '"node_modules/.bin/jsdoc.cmd" -c ./doc-config.json' :
11
- './node_modules/.bin/jsdoc -c ./doc-config.json'
12
- ] ) ) ;
13
5
14
6
gulp . task ( 'test' , function ( ) {
15
7
return gulp . src ( 'test/**/*.spec.js' )
Original file line number Diff line number Diff line change 8
8
},
9
9
"devDependencies" : {
10
10
"@jeremyckahn/minami" : " ^1.3.1" ,
11
- "gulp-eslint" : " ^3.0.1" ,
12
11
"gulp" : " ^3.8.10" ,
12
+ "gulp-eslint" : " ^3.0.1" ,
13
13
"gulp-jasmine" : " ^2.0.1" ,
14
14
"gulp-shell" : " ^0.2.11" ,
15
- "jsdoc" : " 3.5.5"
15
+ "jsdoc" : " 3.5.5" ,
16
+ "live-server" : " ^1.2.0"
16
17
},
17
18
"scripts" : {
18
- "test" : " gulp test"
19
+ "test" : " gulp test" ,
20
+ "doc" : " npm run doc:build && npm run doc:view" ,
21
+ "doc:build" : " jsdoc -c doc-config.json" ,
22
+ "doc:view" : " live-server dist --port=9124"
19
23
},
20
24
"repository" : {
21
25
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -19,29 +19,15 @@ npm install
19
19
20
20
** To setup repository with documentation**
21
21
22
- * Go to the parent directory of the ` javascript-algorithms ` folder and call:
23
-
24
- ``` bash
25
- git clone https://github.com/mgechev/javascript-algorithms.git javascript-algorithms-docs
26
- ```
27
-
28
- * Go to the ` javascript-algorithms-docs ` folder and change current branch to ` gh-pages ` :
29
-
30
22
``` bash
31
- git checkout gh-pages
23
+ npm run:doc
32
24
```
33
25
34
- Now you can see ` index.html ` file in this folder and open it in your browser.
26
+ This will build the documentation and open it in your browser.
35
27
36
28
** To update .html files with documentation**
37
29
38
- Go to the ` javascript-algorithms ` folder and call:
39
-
40
- ``` bash
41
- gulp jsdoc
42
- ```
43
-
44
- and all files in ` javascript-algorithms-docs ` folder will be updated.
30
+ Just run ` npm run:doc ` again.
45
31
46
32
** To run tests**
47
33
You can’t perform that action at this time.
0 commit comments