commit ebbce5aed8f3efa9315abaec302cd1060d609a95
parent 75bb3fdb19ae8bd725d08846d7fe78ea400559ee
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Thu, 18 Jun 2015 21:21:23 +0300
Merge branch 'pr'
Diffstat:
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
@@ -6,11 +6,12 @@
* LICENSE.txt file in the root directory of this source tree.
*/
+import path from 'path';
import cp from 'child_process';
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import del from 'del';
-import path from 'path';
+import mkdirp from 'mkdirp';
import runSequence from 'run-sequence';
import webpack from 'webpack';
import minimist from 'minimist';
@@ -26,7 +27,11 @@ let browserSync;
gulp.task('default', ['sync']);
// Clean output directory
-gulp.task('clean', () => del(['.tmp', 'build/*', '!build/.git'], {dot: true}));
+gulp.task('clean', cb => {
+ del(['.tmp', 'build/*', '!build/.git'], {dot: true}, () => {
+ mkdirp('build/public', cb);
+ });
+});
// Static files
gulp.task('assets', () => {
@@ -52,7 +57,7 @@ gulp.task('resources', () => {
// Bundle
gulp.task('bundle', cb => {
- let config = require('./webpack.config.js');
+ const config = require('./webpack.config.js');
const bundler = webpack(config);
const verbose = !!argv.verbose;
let bundlerRunCount = 0;
@@ -109,7 +114,7 @@ gulp.task('serve', ['build:watch'], cb => {
];
let started = false;
let server = (function startup() {
- var child = cp.fork('build/server.js', {
+ const child = cp.fork('build/server.js', {
env: Object.assign({NODE_ENV: 'development'}, process.env)
});
child.once('message', message => {
diff --git a/package.json b/package.json
@@ -48,6 +48,7 @@
"less": "^2.5.1",
"less-loader": "^2.2.0",
"minimist": "^1.1.1",
+ "mkdirp": "^0.5.1",
"postcss": "^4.1.11",
"postcss-loader": "^0.4.4",
"protractor": "^2.1.0",
diff --git a/webpack.config.js b/webpack.config.js
@@ -69,11 +69,11 @@ const config = {
loaders: [
{
test: /\.css$/,
- loader: STYLE_LOADER + '!' + CSS_LOADER + '!postcss-loader'
+ loader: `${STYLE_LOADER}!${CSS_LOADER}!postcss-loader`
},
{
test: /\.less$/,
- loader: STYLE_LOADER + '!' + CSS_LOADER + '!postcss-loader!less-loader'
+ loader: `${STYLE_LOADER}!${CSS_LOADER}!postcss-loader!less-loader`
},
{
test: /\.gif/,