replace npm by yarn
Yarn provides reliable dependency management for node.js packages. You could still use npm but I would recommend to use yarn to ensure atleast npm packages uses tested versions. Bower is not affected by this change and is still used.
This commit is contained in:
parent
ea1a43e08e
commit
3d81c49cc1
3 changed files with 6702 additions and 13 deletions
25
.travis.yml
25
.travis.yml
|
@ -11,26 +11,31 @@ matrix:
|
|||
allow_failures:
|
||||
- env: TEST_EMBER=false TEST_SAUCE=true TEST_API=false
|
||||
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- node_modules
|
||||
- travis_phantomjs
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
|
||||
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
|
||||
packages:
|
||||
- yarn
|
||||
|
||||
before_install:
|
||||
# update node
|
||||
- nvm install 4
|
||||
- nvm install 6
|
||||
# update phantomjs
|
||||
- export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH; if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs && wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 && tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi
|
||||
# ...
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then npm config set spin false; fi
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then npm install -g npm@^3; fi
|
||||
|
||||
install:
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then npm install -g bower; fi
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then npm install; fi
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then npm prune; fi
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then yarn global add bower; fi
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then yarn install; fi
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then bower install; fi
|
||||
# install non development composer requirements for api
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then cd api/ && composer install --no-dev && cd ..; fi
|
||||
|
@ -42,14 +47,12 @@ before_script:
|
|||
- if $TEST_EMBER; then sleep 10; fi
|
||||
# http://php.net/manual/de/ini.core.php#ini.always-populate-raw-post-data
|
||||
- if $TEST_API; then echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
|
||||
# list all installed npm packages
|
||||
- if $TEST_EMBER || $TEST_SAUCE; then npm list; fi
|
||||
# create a sauce tunnel
|
||||
- if $TEST_SAUCE; then ember sauce:connect; fi
|
||||
|
||||
script:
|
||||
# run frontend and integration tests
|
||||
- if $TEST_EMBER; then npm test; fi
|
||||
- if $TEST_EMBER; then yarn test; fi
|
||||
# test against different browsers using sauce lab
|
||||
# we can not run the integration tests against api cause api is not available to test instance running at sauce lab
|
||||
# therefore we only run acceptance tests by filter
|
||||
|
|
|
@ -32,12 +32,12 @@ Due to security reasons you should have SSL encryption enabled and provide a val
|
|||
|
||||
Production builds are provided [here](https://github.com/jelhan/croodle/releases).
|
||||
|
||||
If you like to build yourself you have to install node.js package management tool [npm](https://www.npmjs.org/), [bower](http://bower.io/), [ember-cli](http://www.ember-cli.com/) and [composer](https://getcomposer.org/) before.
|
||||
If you like to build yourself you have to install [yarn](https://yarnpkg.com/), [bower](http://bower.io/), [ember-cli](http://www.ember-cli.com/) and [composer](https://getcomposer.org/) before.
|
||||
|
||||
```shell
|
||||
git clone git@github.com:jelhan/croodle.git
|
||||
cd croodle
|
||||
npm install
|
||||
yarn install
|
||||
bower install
|
||||
cd api/ && composer install --no-dev && cd ..
|
||||
ember build --prod
|
||||
|
|
Loading…
Reference in a new issue