mirror of
https://github.com/containous/traefik.git
synced 2024-12-22 13:34:03 +03:00
Replace npm with yarn to install/run the webui
This commit is contained in:
parent
25725e9b2f
commit
c7b24f4e9c
2
Makefile
2
Makefile
@ -68,7 +68,7 @@ clean-webui:
|
||||
generate-webui:
|
||||
if [ ! -f "webui/static/index.html" ]; then \
|
||||
$(MAKE) build-webui-image; \
|
||||
docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui npm run build:nc; \
|
||||
docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui yarn build:nc; \
|
||||
docker run --rm -v "$$PWD/webui/static":'/src/webui/static' traefik-webui chown -R $(shell id -u):$(shell id -g) ./static; \
|
||||
fi
|
||||
|
||||
|
@ -8,8 +8,8 @@ COPY ./webui/ $WEBUI_DIR/
|
||||
|
||||
WORKDIR $WEBUI_DIR
|
||||
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
RUN yarn install
|
||||
RUN yarn build
|
||||
|
||||
# BUILD
|
||||
FROM golang:1.17-alpine as gobuild
|
||||
|
@ -7,13 +7,13 @@ ENV PLATFORM_URL=${ARG_PLATFORM_URL}
|
||||
RUN mkdir -p $WEBUI_DIR
|
||||
|
||||
COPY package.json $WEBUI_DIR/
|
||||
COPY package-lock.json $WEBUI_DIR/
|
||||
COPY yarn.lock $WEBUI_DIR/
|
||||
|
||||
WORKDIR $WEBUI_DIR
|
||||
RUN npm install
|
||||
RUN yarn install
|
||||
|
||||
COPY . $WEBUI_DIR/
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
RUN npm run lint
|
||||
RUN yarn lint
|
||||
|
16648
webui/package-lock.json
generated
16648
webui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,9 +11,9 @@
|
||||
"test-unit": "mocha-webpack --mode=production './src/**/*.spec.js'",
|
||||
"dev": "export APP_ENV='development' && quasar dev",
|
||||
"build-quasar": "quasar build",
|
||||
"build-staging": "export NODE_ENV='production' && export APP_ENV='development' && npm run build-quasar",
|
||||
"build": "export NODE_ENV='production' && export APP_ENV='production' && npm run build-quasar && npm run transfer spa",
|
||||
"build:nc": "npm run build"
|
||||
"build-staging": "export NODE_ENV='production' && export APP_ENV='development' && yarn build-quasar",
|
||||
"build": "export NODE_ENV='production' && export APP_ENV='production' && yarn build-quasar && yarn transfer spa",
|
||||
"build:nc": "yarn build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quasar/extras": "^1.0.0",
|
||||
|
@ -20,17 +20,17 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo
|
||||
|
||||
## How to build (only for frontend developer)
|
||||
|
||||
- prerequisite: [Node 12.11+](https://nodejs.org) [Npm](https://www.npmjs.com/)
|
||||
- prerequisite: [Node 12.11+](https://nodejs.org) [Yarn](https://yarnpkg.com/)
|
||||
|
||||
- Go to the `webui/` directory
|
||||
|
||||
- To install dependencies, execute the following commands:
|
||||
|
||||
- `npm install`
|
||||
- `yarn install`
|
||||
|
||||
- Build static Web UI, execute the following command:
|
||||
|
||||
- `npm run build`
|
||||
- `yarn build`
|
||||
|
||||
- Static contents are built in the `webui/static/` directory
|
||||
|
||||
@ -39,7 +39,7 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo
|
||||
- The build allows to:
|
||||
- optimize all JavaScript
|
||||
- optimize all CSS
|
||||
- add vendor prefixes to CSS (cross-bowser support)
|
||||
- add vendor prefixes to CSS (cross-browser support)
|
||||
- add a hash in the file names to prevent browser cache problems
|
||||
- optimize all images at build time
|
||||
- bundle JavaScript in one file
|
||||
@ -51,12 +51,12 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo
|
||||
- Go to the `webui/` directory
|
||||
- Edit files in `webui/src/`
|
||||
- Run in development mode :
|
||||
- `npm run dev`
|
||||
- `yarn dev`
|
||||
|
||||
## Libraries
|
||||
|
||||
- [Node](https://nodejs.org)
|
||||
- [Npm](https://www.npmjs.com/)
|
||||
- [Yarn](https://yarnpkg.com/)
|
||||
- [Webpack](https://github.com/webpack/webpack)
|
||||
- [Vue](https://vuejs.org/)
|
||||
- [Bulma](https://bulma.io)
|
||||
|
9567
webui/yarn.lock
Normal file
9567
webui/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user