chore(webui): better build command
- clean before build (mode force) - update documentation - update `Makefile` - ordering build
This commit is contained in:
parent
b906e9361f
commit
06654ff3a6
4 changed files with 11 additions and 6 deletions
12
Makefile
12
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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']);
|
||||
|
|
|
@ -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`
|
||||
|
||||
|
|
Loading…
Reference in a new issue