Skip to content

Commit f875305

Browse files
authored
Merge pull request #19 from ml5js/switch-to-yarn
change package manager
2 parents b751612 + b89ccb0 commit f875305

File tree

5 files changed

+3701
-5830
lines changed

5 files changed

+3701
-5830
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
## Setup
22

3-
This build uses node version 18.15.0 and npm version.
4-
Install nvm and run the following commands:
3+
This build uses node version 18.15.0.
4+
We use [Yarn](https://yarnpkg.com/) instead of npm to help us better manage dependencies from TensorFlow.js. Yarn is a newer package manager that is very similar to NPM. [Here is a cheat sheet](https://www.digitalocean.com/community/tutorials/nodejs-npm-yarn-cheatsheet) for npm vs Yarn commands.
5+
6+
[Install nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following commands:
57

68
```
79
nvm install 18.15
810
nvm use 18
11+
npm install -g yarn
912
```
1013

1114
To start the development server, run the following commands:
1215

1316
```
14-
npm install
15-
npm start
17+
yarn
18+
yarn start
1619
```
1720

1821
You should see something similar to this in the terminal:
@@ -46,7 +49,7 @@ To automatically format a document when saving it, search for "format on save" i
4649
You can also format a document via the command line. To format all JavaScript documents in the repo, use:
4750

4851
```
49-
npm run format
52+
yarn run format
5053
```
5154

5255
To format a specific document, use
@@ -62,8 +65,8 @@ For more options with the command line, refer to the [Prettier Documentation](ht
6265
To build the ml5 library for production, run the following commands
6366

6467
```
65-
npm install
66-
npm run build
68+
yarn
69+
yarn run build
6770
```
6871

6972
This will create a production version of the library in `/dist` directory.

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@ Welcome to the next-generation repo for the ml5.js project! Due to the complexit
44

55
## Setup
66

7-
This build uses node version 18.15.0 and npm version.
8-
Install nvm and run the following commands:
7+
This build uses node version 18.15.0.
8+
We use [Yarn](https://yarnpkg.com/) instead of npm to help us better manage dependencies from TensorFlow.js. Yarn is a newer package manager that is very similar to NPM. [Here is a cheat sheet](https://www.digitalocean.com/community/tutorials/nodejs-npm-yarn-cheatsheet) for npm vs Yarn commands.
9+
10+
[Install nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following commands:
911

1012
```
1113
nvm install 18.15
1214
nvm use 18
15+
npm install -g yarn
1316
```
1417

1518
To start the development server, run the following commands:
1619

1720
```
18-
npm install
19-
npm start
21+
yarn
22+
yarn start
2023
```
2124

2225
You should see something similar to this in the terminal:

0 commit comments

Comments
 (0)