aboutsummaryrefslogtreecommitdiffstats
path: root/web/gulpfile.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-09-13 23:05:12 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-09-13 23:05:12 +0200
commitd2475e6a146534b5e7aaf2cc7b0b9a75e418415e (patch)
tree47f2ce48a1c03d8ca6414d92a78c764e25a16e3f /web/gulpfile.js
parent9bacb6d426a54882235b8d745dbf123c7958c887 (diff)
downloadmitmproxy-d2475e6a146534b5e7aaf2cc7b0b9a75e418415e.tar.gz
mitmproxy-d2475e6a146534b5e7aaf2cc7b0b9a75e418415e.tar.bz2
mitmproxy-d2475e6a146534b5e7aaf2cc7b0b9a75e418415e.zip
web: start gui
Diffstat (limited to 'web/gulpfile.js')
-rw-r--r--web/gulpfile.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/web/gulpfile.js b/web/gulpfile.js
index f14bcc3b..afc4834a 100644
--- a/web/gulpfile.js
+++ b/web/gulpfile.js
@@ -6,6 +6,7 @@ var jshint = require("gulp-jshint");
var less = require("gulp-less");
var livereload = require("gulp-livereload");
var minifyCSS = require('gulp-minify-css');
+var plumber = require("gulp-plumber");
var react = require("gulp-react");
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
@@ -19,11 +20,13 @@ var path = {
'vendor/lodash/lodash.js',
'vendor/react/react-with-addons.js',
'vendor/react-router/react-router.js',
+ 'vendor/react-bootstrap/react-bootstrap.js'
],
app: [
- 'js/router.jsx',
- 'js/certinstall.jsx',
- 'js/mitmproxy.js',
+ 'js/datastructures.js',
+ 'js/footer.react.js',
+ 'js/header.react.js',
+ 'js/mitmproxy.react.js',
],
},
css: {
@@ -40,6 +43,7 @@ gulp.task("fonts", function () {
function styles(files, dev) {
return (gulp.src(files, {base: "src", cwd: "src"})
+ .pipe(plumber())
.pipe(dev ? sourcemaps.init() : gutil.noop())
.pipe(less())
.pipe(dev ? sourcemaps.write(".", {sourceRoot: "/static"}) : gutil.noop())
@@ -58,8 +62,9 @@ gulp.task("styles-prod", ["styles-app-prod", "styles-vendor-prod"]);
function scripts(files, filename, dev) {
return gulp.src(files, {base: "src", cwd: "src"})
+ .pipe(plumber())
.pipe(dev ? sourcemaps.init() : gutil.noop())
- .pipe(react())
+ .pipe(react({harmony: true}))
.pipe(concat(filename))
.pipe(!dev ? uglify() : gutil.noop())
.pipe(dev ? sourcemaps.write(".", {sourceRoot: "/static"}) : gutil.noop())
@@ -75,7 +80,8 @@ gulp.task("scripts-prod", ["scripts-app-prod", "scripts-vendor-prod"]);
gulp.task("jshint", function () {
return gulp.src(["src/js/**"])
- .pipe(react())
+ .pipe(plumber())
+ .pipe(react({harmony: true}))
.pipe(jshint())
.pipe(jshint.reporter("jshint-stylish"))
});