Skip to content

Switch package management from npm to yarn #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
cache:
directories:
- node_modules
cache: yarn
notifications:
slack:
rooms:
Expand All @@ -11,9 +9,9 @@ matrix:
# 'node_js' is listed for each job to ensure that only two builds are run.
# See https://github.com/hypothesis/client/pull/27#discussion_r70611726
- env: ACTION=lint
node_js: '6.2'
script: npm run lint
node_js: '6.10'
script: yarn run lint
- env: ACTION=test
node_js: '6.2'
node_js: '6.10'
after_success:
npm run report-coverage
yarn run report-coverage
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
node {
checkout scm

nodeEnv = docker.image("node:6.2")
nodeEnv = docker.image("kkarczmarczyk/node-yarn:7.5")
workspace = pwd()

stage 'Build'
Expand All @@ -24,7 +24,7 @@ node {
[$class: 'StringBinding', credentialsId: 'npm-token', variable: 'NPM_TOKEN']]) {

sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh "npm publish"
sh "yarn publish"
}
}

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ clean:
## Run test suite
.PHONY: test
test: node_modules/.uptodate
npm test
yarn test

.PHONY: lint
lint: node_modules/.uptodate
npm run lint
yarn run lint

.PHONY: docs
docs:
Expand All @@ -26,8 +26,8 @@ docs:
################################################################################

build/manifest.json: node_modules/.uptodate
npm run-script build
yarn run build

node_modules/.uptodate: package.json npm-shrinkwrap.json
npm run-script deps 2>/dev/null || npm install
node_modules/.uptodate: package.json yarn.lock
yarn run deps 2>/dev/null || yarn install
@touch $@
3 changes: 2 additions & 1 deletion docs/developers/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Prerequisites
You will need:

* `git <https://git-scm.com/>`_
* `Node.js <https://nodejs.org/en/>`_ v6+
* `Node.js <https://nodejs.org/en/>`_ v6.3+
* `Yarn <https://yarnpkg.com/lang/en/>`_

Building
########
Expand Down
Loading