Commit 44488be8e6f655a8413b94ee81c00702242a651a

Authored by Victor Costa
1 parent ec4b3f1d

Merge stream in gulp noosfero task

Showing 2 changed files with 7 additions and 4 deletions   Show diff stats
gulp/build.js
... ... @@ -3,6 +3,7 @@
3 3 var path = require('path');
4 4 var gulp = require('gulp');
5 5 var rename = require('gulp-rename');
  6 +var merge = require('merge-stream');
6 7 var conf = require('./conf');
7 8  
8 9 var noosferoThemePrefix = path.join("/designs/themes/angular-theme", conf.paths.dist, '/');
... ... @@ -120,13 +121,14 @@ gulp.task('clean-docs', [], function() {
120 121 });
121 122  
122 123 gulp.task('noosfero', ['html'], function () {
123   - gulp.src('layouts/**/*')
  124 + var layouts = gulp.src('layouts/**/*')
124 125 .pipe(gulp.dest(path.join(conf.paths.dist, "layouts")));
125   - gulp.src('theme.yml')
  126 + var theme = gulp.src('theme.yml')
126 127 .pipe(gulp.dest(conf.paths.dist));
127   - return gulp.src(path.join(conf.paths.dist, 'index.html'))
  128 + var index = gulp.src(path.join(conf.paths.dist, 'index.html'))
128 129 .pipe(rename('index.html.erb'))
129 130 .pipe(gulp.dest(conf.paths.dist));
  131 + return merge(layouts, theme, index);
130 132 });
131 133  
132 134 gulp.task('build', ['html', 'fonts', 'other', 'locale', 'noosfero']);
... ...
package.json
... ... @@ -39,7 +39,7 @@
39 39 "estraverse": "~4.1.0",
40 40 "expose-loader": "^0.7.1",
41 41 "glob": "^7.0.0",
42   - "gulp": "~3.9.0",
  42 + "gulp": "^3.9.1",
43 43 "gulp-angular-filesort": "~1.1.1",
44 44 "gulp-angular-templatecache": "~1.8.0",
45 45 "gulp-autoprefixer": "~3.0.2",
... ... @@ -79,6 +79,7 @@
79 79 "karma-webpack": "^1.7.0",
80 80 "lodash": "~3.10.1",
81 81 "main-bower-files": "~2.9.0",
  82 + "merge-stream": "^1.0.0",
82 83 "on-build-webpack": "^0.1.0",
83 84 "phantomjs": "~1.9.18",
84 85 "phantomjs-polyfill": "0.0.2",
... ...