From 8a75cdec32e0eec3762c1b056d6439abef783f61 Mon Sep 17 00:00:00 2001 From: khlieng Date: Wed, 4 Mar 2015 18:49:31 +0100 Subject: [PATCH] Move client build output to bin/assets --- client/gulpfile.js | 18 +++++++++--------- main.go | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/gulpfile.js b/client/gulpfile.js index 67c7abc9..2183a738 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -23,14 +23,14 @@ if (argv.production) { gulp.task('html', function() { gulp.src('./src/*.html') .pipe(minifyHTML()) - .pipe(gulp.dest('./dist')); + .pipe(gulp.dest('../bin/assets')); }); gulp.task('css', function() { gulp.src('./src/css/*.css') .pipe(autoprefixer()) .pipe(minifyCSS()) - .pipe(gulp.dest('./dist/css')); + .pipe(gulp.dest('../bin/assets/css')); }); gulp.task('js', function() { @@ -60,7 +60,7 @@ function js(watch) { return stream .pipe(source('bundle.js')) .pipe(gulpif(argv.production, streamify(uglify()))) - .pipe(gulp.dest('./dist')); + .pipe(gulp.dest('../bin/assets')); }; bundler.on('time', function(time) { @@ -72,23 +72,23 @@ function js(watch) { gulp.task('fonts', function() { gulp.src('./src/font/*') - .pipe(gulp.dest('./dist/font')); + .pipe(gulp.dest('../bin/assets/font')); }); gulp.task('gzip', ['html', 'css', 'js', 'fonts'], function() { - gulp.src('./dist/**/!(*.gz)') + gulp.src('../bin/assets/**/!(*.gz)') .pipe(gzip()) - .pipe(gulp.dest('./dist')); + .pipe(gulp.dest('../bin/assets')); }); gulp.task('gzip:watch', function() { - gulp.src('./dist/**/*.{html,css,js}') + gulp.src('../bin/assets/**/*.{html,css,js}') .pipe(gzip()) - .pipe(gulp.dest('./dist')); + .pipe(gulp.dest('../bin/assets')); }); gulp.task('watch', ['default'], function() { - gulp.watch('./dist/**/*.{html,css,js}', ['gzip:watch']) + gulp.watch('../bin/assets/**/*.{html,css,js}', ['gzip:watch']) gulp.watch('./src/*.html', ['html']); gulp.watch('./src/css/*.css', ['css']); return js(true); diff --git a/main.go b/main.go index 4531a8d7..9bb7c012 100644 --- a/main.go +++ b/main.go @@ -94,7 +94,7 @@ func main() { channelStore = storage.NewChannelStore() sessions = make(map[string]*Session) - fs = http.FileServer(http.Dir("client/dist")) + fs = http.FileServer(http.Dir("assets")) files = []File{ File{"/bundle.js", "text/javascript"},