Skip to content

Commit 9c465f7

Browse files
committed
Merge branch 'release/0.0.1'
2 parents d61c927 + 083d269 commit 9c465f7

File tree

6 files changed

+162
-1
lines changed

6 files changed

+162
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<a name="0.0.1"></a>
2+
## 0.0.1 (2016-12-28)
3+
4+
Initial release
5+
6+
### Features
7+
8+
Call of compodoc

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 SII
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
11
# gulp-compodoc
2-
Compodoc plugin for gulp
2+
[Compodoc](https://github.com/compodoc/compodoc) plugin for gulp
3+
4+
<p align="center">
5+
<img src="https://avatars3.githubusercontent.com/u/23202313" alt="Compodoc: The missing documentation tool for your Angular application" width="226">
6+
<br>
7+
<a href="https://www.npmjs.com/package/gulp-compodoc"><img src="https://badge.fury.io/js/gulp-compodoc.svg" alt="npm badge"></a>
8+
<a href="https://david-dm.org/compodoc/gulp-compodoc"><img src="https://david-dm.org/compodoc/gulp-compodoc.svg" alt="npm dependencies"></a>
9+
<a href="https://david-dm.org/compodoc/gulp-compodoc?type=dev"><img src="https://david-dm.org/compodoc/gulp-compodoc/dev-status.svg" alt="npm devDependencies"></a>
10+
<a href="http://opensource.org/licenses/MIT"><img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT badge"></a>
11+
</p>
12+
13+
<p align="center">The missing documentation tool for your Angular application</p>
14+
15+
<p align="center">
16+
<img src="https://raw.githubusercontent.com/groupe-sii/compodoc/master/screenshots/main-view.png" alt="Compodoc: The missing documentation tool for your Angular application">
17+
</p>
18+
19+
## Install
20+
21+
```
22+
$ npm install --save-dev gulp-compodoc
23+
```
24+
25+
## Usage
26+
27+
```js
28+
const gulp = require('gulp'),
29+
compodoc= require('gulp-compodoc');
30+
31+
gulp.task('default', () => {
32+
return gulp.src('src/**/*.ts')
33+
.pipe(compodoc({
34+
output: 'documentation',
35+
tsconfig: 'src/tsconfig.json',
36+
serve: true
37+
}))
38+
);
39+
```
40+
41+
42+
## API
43+
44+
### compodoc(options)
45+
46+
#### options
47+
48+
All options from [compodoc](https://github.com/compodoc/compodoc) are available. The list is available [here](https://github.com/compodoc/compodoc#usage).
49+
50+
## License
51+
52+
Everything in this repo is MIT License unless otherwise specified.
53+
54+
MIT © 2016 - [Vincent Ogloblinsky](http://www.vincentogloblinsky.com)

index.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
'use strict';
2+
const gutil = require('gulp-util'),
3+
PluginError = gutil.PluginError,
4+
es = require('event-stream'),
5+
through = require('through2'),
6+
compodocModule = require('compodoc'),
7+
PLUGIN_NAME = 'gulp-compodoc';
8+
9+
function compodoc(options) {
10+
var files = [];
11+
options = options || {};
12+
13+
return es.through(function(file) {
14+
files.push(file.path);
15+
}, function() {
16+
var stream = this;
17+
18+
if (files.length === 0) {
19+
stream.emit('error', new PluginError(PLUGIN_NAME, 'No input files for compodoc.'));
20+
stream.emit('end');
21+
return;
22+
} else if (!options.output) {
23+
stream.emit('error', new PluginError(PLUGIN_NAME, 'You must either specify the \'output\' option.'));
24+
stream.emit('end');
25+
return;
26+
} else {
27+
var app = new compodocModule.Application(options);
28+
29+
app.setFiles(files);
30+
app.generate();
31+
32+
return;
33+
}
34+
});
35+
}
36+
37+
module.exports = compodoc;

package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "gulp-compodoc",
3+
"version": "0.0.1",
4+
"description": "Compodoc plugin for gulp",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://[email protected]/compodoc/gulp-compodoc.git"
12+
},
13+
"keywords": [
14+
"gulp",
15+
"gulpplugin",
16+
"angular2",
17+
"angular",
18+
"documentation",
19+
"components",
20+
"module",
21+
"graph",
22+
"dependencies",
23+
"markdown"
24+
],
25+
"author": "Vindent Ogloblinsky ([email protected])",
26+
"license": "MIT",
27+
"bugs": {
28+
"url": "https://github.com/compodoc/gulp-compodoc/issues"
29+
},
30+
"homepage": "https://github.com/compodoc/gulp-compodoc#readme",
31+
"engines": {
32+
"node": ">=5.10.0"
33+
},
34+
"dependencies": {
35+
"gulp-util": "^3.0.7",
36+
"through2": "^2.0.1",
37+
"compodoc": "^0.0.24"
38+
},
39+
"devDependencies": {
40+
"gulp": "^3.9.1"
41+
}
42+
}

0 commit comments

Comments
 (0)