Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaec3200

Browse files
author
Jeremy Kahn
committed
Switch from gulp to npm for doc generation
1 parent84cf135 commitaec3200

File tree

3 files changed

+10
-28
lines changed

3 files changed

+10
-28
lines changed

‎gulpfile.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
'use strict';
22
vargulp=require('gulp');
3-
varshell=require('gulp-shell');
43
vareslint=require('gulp-eslint');
54
varjasmine=require('gulp-jasmine');
6-
varisWin=/^win/.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

146
gulp.task('test',function(){
157
returngulp.src('test/**/*.spec.js')

‎package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@
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",

‎readme.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp