Commit 5e284a96 authored by Sean Hammond's avatar Sean Hammond Committed by GitHub

Merge pull request #359 from hypothesis/yarn

Switch package management from npm to yarn
parents 13bd6744 d8f60dc3
language: node_js language: node_js
cache: cache: yarn
directories:
- node_modules
notifications: notifications:
slack: slack:
rooms: rooms:
...@@ -11,9 +9,9 @@ matrix: ...@@ -11,9 +9,9 @@ matrix:
# 'node_js' is listed for each job to ensure that only two builds are run. # '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 # See https://github.com/hypothesis/client/pull/27#discussion_r70611726
- env: ACTION=lint - env: ACTION=lint
node_js: '6.2' node_js: '6.10'
script: npm run lint script: yarn run lint
- env: ACTION=test - env: ACTION=test
node_js: '6.2' node_js: '6.10'
after_success: after_success:
npm run report-coverage yarn run report-coverage
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
node { node {
checkout scm checkout scm
nodeEnv = docker.image("node:6.2") nodeEnv = docker.image("kkarczmarczyk/node-yarn:7.5")
workspace = pwd() workspace = pwd()
stage 'Build' stage 'Build'
...@@ -24,7 +24,7 @@ node { ...@@ -24,7 +24,7 @@ node {
[$class: 'StringBinding', credentialsId: 'npm-token', variable: 'NPM_TOKEN']]) { [$class: 'StringBinding', credentialsId: 'npm-token', variable: 'NPM_TOKEN']]) {
sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc" sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh "npm publish" sh "yarn publish"
} }
} }
......
...@@ -13,11 +13,11 @@ clean: ...@@ -13,11 +13,11 @@ clean:
## Run test suite ## Run test suite
.PHONY: test .PHONY: test
test: node_modules/.uptodate test: node_modules/.uptodate
npm test yarn test
.PHONY: lint .PHONY: lint
lint: node_modules/.uptodate lint: node_modules/.uptodate
npm run lint yarn run lint
.PHONY: docs .PHONY: docs
docs: docs:
...@@ -26,8 +26,8 @@ docs: ...@@ -26,8 +26,8 @@ docs:
################################################################################ ################################################################################
build/manifest.json: node_modules/.uptodate build/manifest.json: node_modules/.uptodate
npm run-script build yarn run build
node_modules/.uptodate: package.json npm-shrinkwrap.json node_modules/.uptodate: package.json yarn.lock
npm run-script deps 2>/dev/null || npm install yarn run deps 2>/dev/null || yarn install
@touch $@ @touch $@
...@@ -14,7 +14,8 @@ Prerequisites ...@@ -14,7 +14,8 @@ Prerequisites
You will need: You will need:
* `git <https://git-scm.com/>`_ * `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 Building
######## ########
......
This diff is collapsed.
...@@ -150,6 +150,6 @@ ...@@ -150,6 +150,6 @@
"preversion": "./scripts/preversion.sh", "preversion": "./scripts/preversion.sh",
"version": "make clean all && ./scripts/update-changelog.js && git add CHANGELOG.md", "version": "make clean all && ./scripts/update-changelog.js && git add CHANGELOG.md",
"postversion": "./scripts/postversion.sh", "postversion": "./scripts/postversion.sh",
"prepublish": "npm run-script build" "prepublish": "yarn run build"
} }
} }
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment