Skip to content

Commit

Permalink
added gulp docs:generate task, pipes js through ngDocs and outputs do…
Browse files Browse the repository at this point in the history
…cumentation and view app to /docs
  • Loading branch information
mrjosh-zz committed Apr 25, 2015
1 parent 029b89d commit 56ff493
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -4,3 +4,7 @@ dist
.tmp
.sass-cache
wallaby.conf.js
docs/*
!docs/img/
!.gitkeep

Empty file added docs/.gitkeep
Empty file.
Empty file added docs/img/.gitkeep
Empty file.
Binary file added docs/img/CIViC_logo_sm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions gulp/docs.js
@@ -0,0 +1,24 @@
'use strict';

var gulp = require('gulp');
var gulpDocs = require('gulp-ngdocs');

gulp.task('docs:generate', [], function () {
var options = {
scripts: [
'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.28/angular.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.28/angular-animate.min.js'
],
html5Mode: false,
startPage: '/docs',
title: "CIViC Client Developer Documentation",
image: "CIViC_logo_sm.png",
imageLink: "http://civicdb.org",
titleLink: "/docs",
discussions: true
};

return gulp.src('src/{app,components}/**/*.js')
.pipe(gulpDocs.process(options))
.pipe(gulp.dest('./docs'));
});
1 change: 1 addition & 0 deletions gulp/server.js
Expand Up @@ -33,6 +33,7 @@ gulp.task('serve', ['images', 'fonts', 'watch'], function () {
connectInit([
'./src',
'./.tmp',
'./docs',
path.resolve('./') // include root (kludge necessary to make bower_components available where index.html expects them)
], true);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,7 +5,6 @@
"type": "git",
"url": "git://github.com/genome/civic-client"
},
"dependencies": {},
"devDependencies": {
"browser-sync": "^1.3.6",
"browserify": "^9.0.3",
Expand Down Expand Up @@ -33,6 +32,7 @@
"gulp-minify-html": "^0.1.3",
"gulp-ng-annotate": "^0.5.2",
"gulp-ng-html2js": "^0.1.6",
"gulp-ngdocs": "^0.2.10",
"gulp-protractor": "^0.0.11",
"gulp-replace": "^0.4.0",
"gulp-rev": "^1.1.0",
Expand Down

0 comments on commit 56ff493

Please sign in to comment.