Skip to content

Commit

Permalink
Replace yarn with npm
Browse files Browse the repository at this point in the history
The recommended way of installing nin is by npm link, so using yarn
doesn't relly make sense. (There is no proper yarn alternative for npm
link -- yarn link does something else). At any rate, npm is good again
now, so making the switch isn't too bad.
  • Loading branch information
sigvef committed Oct 28, 2018
1 parent e3db2be commit 39fb848
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10,745 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ node_js:
notifications:
email: false
install:
- npm install -g yarn
- yarn
- cd nin/frontend && yarn && cd -
- npm install
- cd nin/frontend && npm install && cd -
script:
- cd nin/backend && ../../node_modules/.bin/eslint .
- cd ../frontend && make lint
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: all
all:
yarn start
npm start

.PHONY: publish
publish: all
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ Expect to render maybe a frame or two per second.

## Setup

You will need to have node and yarn installed.
Yarn installation guide is available [here](https://yarnpkg.com/en/docs/install).
You will need to have node installed.

Running `make` in the nin folder will build and compile the entire project.
Running `npm link` will add nin to your node binaries path, making it available globally.
Expand Down Expand Up @@ -241,9 +240,9 @@ To be able to publish you need access to the `ninjadev` user on npm whose passwo

## Notes on working in windows

The prerequisites remain the same, you at least need Yarn and Node.
The prerequisites remain the same, you at least need Node.

To build and compile the entire project, for now, you need only run `yarn start` in the root of the nin-repo.
To build and compile the entire project, for now, you need only run `npm start` in the root of the nin-repo.
To run nin without linking up through npm you can replace the `nin`-command with `node path-to-ninrepo/nin/backend/nin`.
E.g. when you are in a project folder of a demo, and you want to run it with your freshly compiled nin directly, you can run `node path-to-ninrepo/nin/backend/nin run` instead of `nin run`.

Expand Down
6 changes: 3 additions & 3 deletions nin/frontend/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.PHONY: all
all:
yarn start
npm start

.PHONY: run
run:
yarn run webpack-watch
npm run webpack-watch

.PHONY: lint
lint:
yarn lint
npm run lint
2 changes: 1 addition & 1 deletion nin/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"node": ">=4.0.0"
},
"scripts": {
"start": "yarn install && yarn build",
"start": "npm install && npm build",
"build": "webpack -p",
"webpack-watch": "webpack --watch --display-error-details",
"lint": "eslint app",
Expand Down
Loading

0 comments on commit 39fb848

Please sign in to comment.