Skip to content

Commit ab3cdd1

Browse files
author
Tane Morgan
committedJun 2, 2019
Switch to npm
1 parent 30c7f6d commit ab3cdd1

10 files changed

+7861
-5587
lines changed
 

‎.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ NOTES.md
33
TODO.md
44
_coverage/
55
config/environments/*.json
6-
node_modules/
7-
yarn-error.log
6+
node_modules/

‎.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact true

‎.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ node_js:
55
services:
66
- docker
77
script:
8-
- yarn lint
9-
- yarn docker:test
8+
- npm run lint
9+
- npm run docker:test
1010
notifications:
1111
email: false
1212
env:

‎Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM node:10.16.0
33
RUN mkdir -p /usr/src/app
44
WORKDIR /usr/src/app
55

6-
COPY package.json yarn.lock ./
7-
RUN yarn
6+
COPY package.json package-lock.json ./
7+
RUN npm install
88

99
COPY . .
1010

‎README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@ Ensure [Docker Compose](https://docs.docker.com/compose/install/) is installed,
2323

2424
1. Clone this repo.
2525
2. Change to the above dir.
26-
3. Run `yarn docker:start` to start the app.
26+
3. Run `npm run docker:start` to start the app.
2727

2828
## Running Tests
2929

3030
Run the full test suite with:
3131

3232
```
33-
$ yarn docker:test
33+
$ npm run docker:test
3434
```
3535

3636
CLI args will be passed through to Jest. For example, to run in watch mode:
3737

3838
```
39-
$ yarn docker:test --watch
39+
$ npm run docker:test --watch
4040
```
4141

4242
This project also passes the [realworld-server-tester](https://github.com/agrison/realworld-server-tester) test suite. First start the server:
4343

4444
```
45-
$ yarn docker:start
45+
$ npm run docker:start
4646
```
4747

4848
Then in a new terminal window, assuming you've cloned the `realworld-server-tester` repo and changed to the correct directory, run:

‎bin/start.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set -e
55
if [ "$NODE_ENV" = "production" ]; then
66
node lib/server.js
77
else
8-
$(yarn bin)/knex --knexfile config/knexfile.js migrate:latest
9-
$(yarn bin)/nodemon lib/server.js | $(yarn bin)/pino-pretty -c -t
8+
npx knex --knexfile config/knexfile.js migrate:latest
9+
npx nodemon lib/server.js | npx pino-pretty -c -t
1010
fi

‎bin/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
set -e
44

55
if [ "$CI" = true ]; then
6-
$(yarn bin)/jest -i --coverage
6+
npx jest -i --coverage
77
cat ./_coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
88
else
9-
$(yarn bin)/jest -i "$@"
9+
npx jest -i "$@"
1010
fi

0 commit comments

Comments
 (0)