Skip to content

Commit

Permalink
Serve from .tmp folder as well
Browse files Browse the repository at this point in the history
  • Loading branch information
silvenon committed Apr 14, 2014
1 parent d1d98a1 commit 24ee733
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions app/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gulp.task('styles', function () {<% if (includeSass) { %>
}))<% } else { %>
return gulp.src('app/styles/main.css')<% } %>
.pipe($.autoprefixer('last 1 version'))
.pipe(gulp.dest('app/styles'))
.pipe(gulp.dest('.tmp/styles'))
.pipe($.size());
});

Expand Down Expand Up @@ -62,7 +62,7 @@ gulp.task('fonts', function () {
});

gulp.task('clean', function () {
return gulp.src(['dist'], { read: false }).pipe($.clean());
return gulp.src(['.tmp', 'dist'], { read: false }).pipe($.clean());
});

gulp.task('build', ['html', 'images', 'fonts']);
Expand All @@ -76,6 +76,7 @@ gulp.task('connect', function () {
var app = connect()
.use(require('connect-livereload')({ port: 35729 }))
.use(connect.static('app'))
.use(connect.static('.tmp'))
.use(connect.directory('app'));

require('http').createServer(app)
Expand Down Expand Up @@ -110,10 +111,11 @@ gulp.task('wiredep', function () {
gulp.task('watch', ['connect', 'serve'], function () {
var server = $.livereload();

// watch for changes in the `app` folder
// watch for changes

gulp.watch([
'app/*.html',
'app/styles/**/*.css',
'.tmp/styles/**/*.css',
'app/scripts/**/*.js',
'app/images/**/*'
]).on('change', function (file) {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- endbower -->
<!-- endbuild -->

<!-- build:css styles/main.css -->
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
<% if (includeModernizr) { %>
Expand Down

0 comments on commit 24ee733

Please sign in to comment.