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