Commit c7eb46d45a8619ec5068dca4a9a0b68ec1d16dbb

Authored by Carlos Purificação
1 parent 7b837dbc

Added ngdocs configuration

1 node_modules/ 1 node_modules/
2 bower_components/ 2 bower_components/
3 coverage/ 3 coverage/
  4 +docs/
4 .sass-cache/ 5 .sass-cache/
5 .idea/ 6 .idea/
6 .tmp/ 7 .tmp/
@@ -98,4 +98,8 @@ gulp.task('clean', function () { @@ -98,4 +98,8 @@ gulp.task('clean', function () {
98 return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]); 98 return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]);
99 }); 99 });
100 100
  101 +gulp.task('clean-docs', [], function() {
  102 + return $.del([path.join(conf.paths.docs, '/')]);
  103 +});
  104 +
101 gulp.task('build', ['html', 'fonts', 'other']); 105 gulp.task('build', ['html', 'fonts', 'other']);
@@ -15,7 +15,8 @@ exports.paths = { @@ -15,7 +15,8 @@ exports.paths = {
15 src: 'src', 15 src: 'src',
16 dist: 'dist', 16 dist: 'dist',
17 tmp: '.tmp', 17 tmp: '.tmp',
18 - e2e: 'e2e' 18 + e2e: 'e2e',
  19 + docs: 'docs'
19 }; 20 };
20 21
21 /** 22 /**
@@ -27,3 +27,42 @@ wrench.readdirSyncRecursive('./gulp').filter(function(file) { @@ -27,3 +27,42 @@ wrench.readdirSyncRecursive('./gulp').filter(function(file) {
27 gulp.task('default', ['clean'], function () { 27 gulp.task('default', ['clean'], function () {
28 gulp.start('build'); 28 gulp.start('build');
29 }); 29 });
  30 +
  31 +gulp.task('ngdocs', ['clean-docs'], function () {
  32 + var gulpDocs = require('gulp-ngdocs');
  33 + var options = {
  34 + scripts: [
  35 + 'bower_components/angular/angular.min.js',
  36 + 'bower_components/angular/angular.min.js.map',
  37 + 'bower_components/angular-animate/angular-animate.min.js',
  38 + 'bower_components/angular-animate/angular-animate.min.js.map'
  39 + //'bower_components/angular/angular.js'
  40 + ],
  41 + html5Mode: true,
  42 + startPage: '/',
  43 + title: "Noosfero Angular Theme Documentation",
  44 + //image: "path/to/my/image.png",
  45 + //imageLink: "http://my-domain.com",
  46 + titleLink: "/",
  47 + loadDefaults: {
  48 + angular: false,
  49 + angularAnimate: false
  50 + }
  51 + }
  52 + return gulpDocs.sections({
  53 + api: {
  54 + glob:[
  55 + //'src/**/*.js', '!src/noosfero.js', '!src/noosfero-specs.js'
  56 + //'src/noosfero.js'
  57 + 'src/**/*.ts'
  58 + ],//, '!src/**/*.spec.js'],
  59 + api: true,
  60 + title: 'API Documentation'
  61 + },
  62 + tutorial: {
  63 + glob: ['content/tutorial/*.ngdoc'],
  64 + title: 'Tutorial'
  65 + }
  66 + }).pipe(gulpDocs.process(options)).pipe(gulp.dest('./docs'));
  67 +});
  68 +
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "dependencies": { 4 "dependencies": {
5 "angular": "^1.5.0", 5 "angular": "^1.5.0",
6 "angular-mock": "^1.0.0", 6 "angular-mock": "^1.0.0",
7 - "moment": "^2.11.2" 7 + "moment": "^2.11.2"
8 }, 8 },
9 "scripts": { 9 "scripts": {
10 "webpack": "webpack", 10 "webpack": "webpack",
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
41 "gulp-minify-css": "~1.2.1", 41 "gulp-minify-css": "~1.2.1",
42 "gulp-minify-html": "~1.0.4", 42 "gulp-minify-html": "~1.0.4",
43 "gulp-ng-annotate": "~1.1.0", 43 "gulp-ng-annotate": "~1.1.0",
  44 + "gulp-ngdocs": "0.2.13",
44 "gulp-protractor": "~1.0.0", 45 "gulp-protractor": "~1.0.0",
45 "gulp-rename": "~1.2.2", 46 "gulp-rename": "~1.2.2",
46 "gulp-replace": "~0.5.4", 47 "gulp-replace": "~0.5.4",