Merge pull request #2391 from alecmerdler/yarn-over-npm
Replace 'npm' with 'yarn'
This commit is contained in:
commit
21b09a7451
4 changed files with 4616 additions and 19 deletions
27
Dockerfile
27
Dockerfile
|
@ -9,6 +9,10 @@ ENV HOME /root
|
||||||
# When Ubuntu has nginx >= 1.11.0 we can switch back.
|
# When Ubuntu has nginx >= 1.11.0 we can switch back.
|
||||||
RUN add-apt-repository ppa:nginx/development
|
RUN add-apt-repository ppa:nginx/development
|
||||||
|
|
||||||
|
# Add Yarn repository until it is officially added to Ubuntu
|
||||||
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
|
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||||
|
|
||||||
# Install system packages
|
# Install system packages
|
||||||
RUN apt-get update && apt-get upgrade -y # 22FEB2017
|
RUN apt-get update && apt-get upgrade -y # 22FEB2017
|
||||||
RUN apt-get install -y \
|
RUN apt-get install -y \
|
||||||
|
@ -37,12 +41,12 @@ RUN apt-get install -y \
|
||||||
monit \
|
monit \
|
||||||
nginx \
|
nginx \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
|
||||||
optipng \
|
optipng \
|
||||||
python-dbg \
|
python-dbg \
|
||||||
python-dev \
|
python-dev \
|
||||||
python-pip \
|
python-pip \
|
||||||
python-virtualenv
|
python-virtualenv \
|
||||||
|
yarn
|
||||||
|
|
||||||
# Install python dependencies
|
# Install python dependencies
|
||||||
ADD requirements.txt requirements.txt
|
ADD requirements.txt requirements.txt
|
||||||
|
@ -78,14 +82,13 @@ RUN chmod +x /usr/local/bin/jwtproxy
|
||||||
RUN curl -L -o /usr/local/bin/prometheus-aggregator https://github.com/coreos/prometheus-aggregator/releases/download/v0.0.1-alpha/prometheus-aggregator
|
RUN curl -L -o /usr/local/bin/prometheus-aggregator https://github.com/coreos/prometheus-aggregator/releases/download/v0.0.1-alpha/prometheus-aggregator
|
||||||
RUN chmod +x /usr/local/bin/prometheus-aggregator
|
RUN chmod +x /usr/local/bin/prometheus-aggregator
|
||||||
|
|
||||||
# Install Webpack, Typescript
|
# Install front-end dependencies
|
||||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||||
ADD package.json package.json
|
ADD package.json package.json
|
||||||
ADD tsconfig.json tsconfig.json
|
ADD tsconfig.json tsconfig.json
|
||||||
ADD webpack.config.js webpack.config.js
|
ADD webpack.config.js webpack.config.js
|
||||||
ADD typings.json typings.json
|
ADD typings.json typings.json
|
||||||
RUN npm install
|
RUN yarn install --ignore-engines
|
||||||
RUN npm link typescript
|
|
||||||
|
|
||||||
# Add static files
|
# Add static files
|
||||||
ADD static static
|
ADD static static
|
||||||
|
@ -99,17 +102,15 @@ ENV RUN_TESTS ${RUN_TESTS}
|
||||||
|
|
||||||
ADD karma.conf.js karma.conf.js
|
ADD karma.conf.js karma.conf.js
|
||||||
RUN if [ "$RUN_TESTS" = true ]; then \
|
RUN if [ "$RUN_TESTS" = true ]; then \
|
||||||
npm test; \
|
yarn test; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Grunt
|
# Install Grunt and Grunt depenencies
|
||||||
RUN npm install -g grunt-cli
|
RUN yarn global add grunt-cli
|
||||||
|
|
||||||
# Install Grunt depenencies
|
|
||||||
ADD grunt grunt
|
ADD grunt grunt
|
||||||
RUN cd grunt && npm install
|
RUN cd grunt && yarn install
|
||||||
|
|
||||||
# Run grunt
|
# Run Grunt
|
||||||
RUN cd grunt && grunt
|
RUN cd grunt && grunt
|
||||||
|
|
||||||
# Optimize our images
|
# Optimize our images
|
||||||
|
@ -117,7 +118,7 @@ ADD static/img static/img
|
||||||
RUN jpegoptim static/img/**/*.jpg
|
RUN jpegoptim static/img/**/*.jpg
|
||||||
RUN optipng -clobber -quiet static/img/**/*.png
|
RUN optipng -clobber -quiet static/img/**/*.png
|
||||||
|
|
||||||
RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev libffi-dev libgpgme11-dev nodejs npm jpegoptim optipng
|
RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev libffi-dev libgpgme11-dev nodejs jpegoptim optipng
|
||||||
RUN apt-get autoremove -y
|
RUN apt-get autoremove -y
|
||||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
|
11
README.md
11
README.md
|
@ -86,7 +86,7 @@ macOS developers will need:
|
||||||
git clone git@github.com:coreos-inc/quay.git && cd quay
|
git clone git@github.com:coreos-inc/quay.git && cd quay
|
||||||
|
|
||||||
# Install the system dependencies
|
# Install the system dependencies
|
||||||
brew install libevent libmagic postgresql gpgme pyenv pyenv-virtualenv pyenv-pip-rehash docker docker-machine node
|
brew install libevent libmagic postgresql gpgme pyenv pyenv-virtualenv pyenv-pip-rehash docker docker-machine node yarn
|
||||||
|
|
||||||
# Create a default virtualmachine for docker
|
# Create a default virtualmachine for docker
|
||||||
docker-machine create -d virtualbox default
|
docker-machine create -d virtualbox default
|
||||||
|
@ -118,10 +118,10 @@ git clone git@github.com:coreos-inc/quay-config.git ../quay-config
|
||||||
ln -s ../../quay-config/local conf/stack
|
ln -s ../../quay-config/local conf/stack
|
||||||
|
|
||||||
# Install Node Dependencies
|
# Install Node Dependencies
|
||||||
npm install
|
yarn install
|
||||||
|
|
||||||
# Link Typescript
|
# Link Typescript
|
||||||
npm link typescript
|
yarn link typescript
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Third Party Docs
|
#### Third Party Docs
|
||||||
|
@ -172,8 +172,9 @@ go get github.com/mattn/goreman
|
||||||
|
|
||||||
* `local-run` runs the web server for testing
|
* `local-run` runs the web server for testing
|
||||||
* `local-test` runs the unit test suite
|
* `local-test` runs the unit test suite
|
||||||
* `npm run build` builds front end dependencies
|
* `yarn run build` builds front-end dependencies
|
||||||
* `npm run watch` a watcher for webpack
|
* `yarn run watch` builds and watches front-end dependencies
|
||||||
|
* `yarn test` runs front-end test suite
|
||||||
|
|
||||||
### Development inside Docker
|
### Development inside Docker
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
"source-map-loader": "0.1.5",
|
"source-map-loader": "0.1.5",
|
||||||
"style-loader": "0.13.1",
|
"style-loader": "0.13.1",
|
||||||
"ts-loader": "0.9.5",
|
"ts-loader": "0.9.5",
|
||||||
"typescript": "2.0.3",
|
"typescript": "2.2.1",
|
||||||
"typings": "1.4.0",
|
"typings": "1.4.0",
|
||||||
"webpack": "^2.2"
|
"webpack": "^2.2"
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue