Use the yarn pacakge manager for javascript
[Yarn](https://yarnpkg.com/) is a drop in replacement for npm. We should use it because: * It's faster * It uses a lockfile, making the builds more deterministic.
This commit is contained in:
parent
a186d5f87a
commit
987ab7612d
3 changed files with 6398 additions and 5 deletions
|
@ -1,13 +1,15 @@
|
||||||
FROM node:6.3.0
|
FROM node:6.9.1
|
||||||
|
|
||||||
ENV WEBUI_DIR /src/webui
|
ENV WEBUI_DIR /src/webui
|
||||||
RUN mkdir -p $WEBUI_DIR
|
RUN mkdir -p $WEBUI_DIR
|
||||||
|
|
||||||
COPY package.json $WEBUI_DIR/
|
COPY package.json $WEBUI_DIR/
|
||||||
|
COPY yarn.lock $WEBUI_DIR/
|
||||||
|
|
||||||
WORKDIR $WEBUI_DIR
|
WORKDIR $WEBUI_DIR
|
||||||
RUN npm set progress=false
|
RUN npm set progress=false
|
||||||
RUN npm install --quiet
|
RUN npm install --quiet --global yarn@0.16.1
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
COPY . $WEBUI_DIR/
|
COPY . $WEBUI_DIR/
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,12 @@ make generate-webui # Generate static contents in `traefik/static/` folder.
|
||||||
|
|
||||||
## How to build (only for frontends developer)
|
## How to build (only for frontends developer)
|
||||||
|
|
||||||
- prerequisite: [Node 4+ and NPM 3+](https://nodejs.org)
|
- prerequisite: [Node 4+](https://nodejs.org) [yarn](https://yarnpkg.com/)
|
||||||
|
|
||||||
- Go to the directory `webui`
|
- Go to the directory `webui`
|
||||||
|
|
||||||
- To install dependencies, execute the following commands:
|
- To install dependencies, execute the following commands:
|
||||||
- `npm install`
|
- `yarn install`
|
||||||
|
|
||||||
- Build static Web UI, execute the following command:
|
- Build static Web UI, execute the following command:
|
||||||
- `gulp`
|
- `gulp`
|
||||||
|
@ -62,6 +62,7 @@ make generate-webui # Generate static contents in `traefik/static/` folder.
|
||||||
## Libraries
|
## Libraries
|
||||||
|
|
||||||
- [Node](https://nodejs.org)
|
- [Node](https://nodejs.org)
|
||||||
|
- [Yarn](https://yarnpkg.com/)
|
||||||
- [Generator FountainJS](https://github.com/FountainJS/generator-fountain-webapp)
|
- [Generator FountainJS](https://github.com/FountainJS/generator-fountain-webapp)
|
||||||
- [Webpack](https://github.com/webpack/webpack)
|
- [Webpack](https://github.com/webpack/webpack)
|
||||||
- [AngularJS](https://docs.angularjs.org/api)
|
- [AngularJS](https://docs.angularjs.org/api)
|
||||||
|
|
6390
webui/yarn.lock
Normal file
6390
webui/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue