File tree Expand file tree Collapse file tree 3 files changed +10
-28
lines changed Expand file tree Collapse file tree 3 files changed +10
-28
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22var gulp = require ( 'gulp' ) ;
3- var shell = require ( 'gulp-shell' ) ;
43var eslint = require ( 'gulp-eslint' ) ;
54var 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- ] ) ) ;
135
146gulp . task ( 'test' , function ( ) {
157 return gulp . src ( 'test/**/*.spec.js' )
Original file line number Diff line number Diff line change 88 },
99 "devDependencies" : {
1010 "@jeremyckahn/minami" : " ^1.3.1" ,
11- "gulp-eslint" : " ^3.0.1" ,
1211 "gulp" : " ^3.8.10" ,
12+ "gulp-eslint" : " ^3.0.1" ,
1313 "gulp-jasmine" : " ^2.0.1" ,
1414 "gulp-shell" : " ^0.2.11" ,
15- "jsdoc" : " 3.5.5"
15+ "jsdoc" : " 3.5.5" ,
16+ "live-server" : " ^1.2.0"
1617 },
1718 "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"
1923 },
2024 "repository" : {
2125 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -19,29 +19,15 @@ npm install
1919
2020** To setup repository with documentation**
2121
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-
3022``` bash
31- git checkout gh-pages
23+ npm run:doc
3224```
3325
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.
3527
3628** To update .html files with documentation**
3729
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.
4531
4632** To run tests**
4733
You can’t perform that action at this time.
0 commit comments