fix(build): ensure that asset files are copied over to example directories

This commit is contained in:
Matias Niemelä 2015-06-10 16:51:46 -07:00
parent 355ab5b3a6
commit 60b97b27fa
3 changed files with 8 additions and 15 deletions

View File

@ -247,7 +247,6 @@ gulp.task('serve.js.dev', ['build.js.dev'], function(neverDone) {
})(); })();
}); });
gulp.task('serve.js.prod', jsserve(gulp, gulpPlugins, { gulp.task('serve.js.prod', jsserve(gulp, gulpPlugins, {
path: CONFIG.dest.js.prod.es5, path: CONFIG.dest.js.prod.es5,
port: 8001 port: 8001
@ -852,16 +851,6 @@ gulp.task('!build/change_detect.dart', function(done) {
proc.stdout.pipe(dartStream); proc.stdout.pipe(dartStream);
}); });
// ------------
// additional tasks for building examples
gulp.task('build.http.example', function() {
//Copy over people.json used in http example
return gulp.src('modules/examples/src/http/people.json')
.pipe(gulp.dest(CONFIG.dest.js.prod.es5 + '/examples/src/http/'))
.pipe(gulp.dest(CONFIG.dest.js.dev.es5 + '/examples/src/http/'))
.pipe(gulp.dest(CONFIG.dest.js.dart2js + '/examples/src/http/'));
});
// ------------ // ------------
// angular material testing rules // angular material testing rules
gulp.task('build.css.material', function() { gulp.task('build.css.material', function() {

View File

@ -16,7 +16,6 @@ function killServer () {
serverPid=$! serverPid=$!
./node_modules/.bin/gulp build.css.material& ./node_modules/.bin/gulp build.css.material&
./node_modules/.bin/gulp build.http.example&
trap killServer EXIT trap killServer EXIT

View File

@ -178,8 +178,13 @@ module.exports = function makeBrowserTree(options, destinationPath) {
] ]
}); });
var assetsTree = new Funnel(modulesTree,{
include: ['**/*'],
exclude: ['**/*.{html,ts,dart}'],
destDir: '/'
});
var scripts = mergeTrees(servingTrees); var scripts = mergeTrees(servingTrees);
var css = new Funnel(modulesTree, {include: ["**/*.css"]});
var polymerFiles = new Funnel('.', { var polymerFiles = new Funnel('.', {
files: [ files: [
'bower_components/polymer/lib/polymer.html', 'bower_components/polymer/lib/polymer.html',
@ -191,9 +196,9 @@ module.exports = function makeBrowserTree(options, destinationPath) {
var reactFiles = new Funnel('.', {files: ['node_modules/react/dist/react.min.js']}); var reactFiles = new Funnel('.', {files: ['node_modules/react/dist/react.min.js']});
var react = stew.mv(flatten(reactFiles), 'benchmarks_external/src/tree/react'); var react = stew.mv(flatten(reactFiles), 'benchmarks_external/src/tree/react');
htmlTree = mergeTrees([htmlTree, scripts, polymer, css, react]); htmlTree = mergeTrees([htmlTree, scripts, polymer, react]);
es5Tree = mergeTrees([es5Tree, htmlTree]); es5Tree = mergeTrees([es5Tree, htmlTree, assetsTree]);
var mergedTree = mergeTrees([stew.mv(es6Tree, '/es6'), stew.mv(es5Tree, '/es5')]); var mergedTree = mergeTrees([stew.mv(es6Tree, '/es6'), stew.mv(es5Tree, '/es5')]);