diff --git a/Makefile b/Makefile index 191331eb9..0ac639baa 100644 --- a/Makefile +++ b/Makefile @@ -24,10 +24,10 @@ default: binary all: build $(DOCKER_RUN_TRAEFIK) ./script/make.sh -binary: build generate-webui +binary: build-webui generate-webui build $(DOCKER_RUN_TRAEFIK) ./script/make.sh generate binary -crossbinary: build generate-webui +crossbinary: build-webui generate-webui build $(DOCKER_RUN_TRAEFIK) ./script/make.sh generate crossbinary test: build @@ -52,9 +52,11 @@ validate-golint: build $(DOCKER_RUN_TRAEFIK) ./script/make.sh validate-golint build: dist - docker build -t traefik-webui -f webui/Dockerfile webui docker build -t "$(TRAEFIK_DEV_IMAGE)" -f build.Dockerfile . +build-webui: + docker build -t traefik-webui -f webui/Dockerfile webui + build-no-cache: dist docker build --no-cache -t "$(TRAEFIK_DEV_IMAGE)" -f build.Dockerfile . @@ -73,4 +75,6 @@ run-dev: ./traefik generate-webui: - docker run --rm -v "$$PWD/static":'/src/static' traefik-webui gulp build + mkdir -p static + docker run --rm -v "$$PWD/static":'/src/static' traefik-webui gulp + echo 'For more informations show `webui/readme.md`' > $$PWD/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md diff --git a/webui/Dockerfile b/webui/Dockerfile index 196da1d7d..7795a887b 100644 --- a/webui/Dockerfile +++ b/webui/Dockerfile @@ -10,6 +10,7 @@ COPY .bowerrc $WEBUI_DIR/ COPY bower.json $WEBUI_DIR/ WORKDIR $WEBUI_DIR +RUN npm set progress=false RUN npm install RUN bower install --allow-root diff --git a/webui/gulp/build.js b/webui/gulp/build.js index 2a50555ac..ed75a4832 100644 --- a/webui/gulp/build.js +++ b/webui/gulp/build.js @@ -92,7 +92,7 @@ gulp.task('other', function () { }); gulp.task('clean', function () { - return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]); + return $.del([path.join(conf.paths.dist, '/**'), '!' + conf.paths.dist, path.join(conf.paths.tmp, '/')], {force: true}); }); gulp.task('build', ['html', 'fonts', 'other']); diff --git a/webui/readme.md b/webui/readme.md index 33a683386..5ffe3c3b8 100644 --- a/webui/readme.md +++ b/webui/readme.md @@ -28,7 +28,7 @@ make generate-webui # Generate static contents in `traefik/static/` folder. - `bower install` - Build static Web UI, execute the following command: - - `gulp build` + - `gulp` - Static contents are build in the directory `static`