chore(webui): better build command

- clean before build (mode force)
- update documentation
- update `Makefile`
- ordering build
This commit is contained in:
Fernandez Ludovic 2016-01-25 22:23:56 +01:00
parent b906e9361f
commit 06654ff3a6
4 changed files with 11 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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']);

View file

@ -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`