Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
fix(build): copy css files over to the dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Sep 10, 2015
1 parent c5d71b8 commit a64608e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions build/paths.js
Expand Up @@ -7,6 +7,7 @@ module.exports = {
root: appRoot,
source: appRoot + '**/*.js',
html: appRoot + '**/*.html',
css: appRoot + '**/*.css',
style: 'styles/**/*.css',
output: outputRoot,
doc:'./doc',
Expand Down
9 changes: 8 additions & 1 deletion build/tasks/build.js
Expand Up @@ -30,14 +30,21 @@ gulp.task('build-html', function () {
.pipe(gulp.dest(paths.output));
});

// copies changed css files to the output directory
gulp.task('build-css', function () {
return gulp.src(paths.css)
.pipe(changed(paths.output, {extension: '.css'}))
.pipe(gulp.dest(paths.output));
});

// this task calls the clean task (located
// in ./clean.js), then runs the build-system
// and build-html tasks in parallel
// https://www.npmjs.com/package/gulp-run-sequence
gulp.task('build', function(callback) {
return runSequence(
'clean',
['build-system', 'build-html'],
['build-system', 'build-html', 'build-css'],
callback
);
});
1 change: 1 addition & 0 deletions build/tasks/watch.js
Expand Up @@ -14,5 +14,6 @@ function reportChange(event){
gulp.task('watch', ['serve'], function() {
gulp.watch(paths.source, ['build-system', browserSync.reload]).on('change', reportChange);
gulp.watch(paths.html, ['build-html', browserSync.reload]).on('change', reportChange);
gulp.watch(paths.css, ['build-css', browserSync.reload]).on('change', reportChange);
gulp.watch(paths.style, browserSync.reload).on('change', reportChange);
});

0 comments on commit a64608e

Please sign in to comment.