Skip to content

Commit

Permalink
Merge pull request #19 from ml5js/switch-to-yarn
Browse files Browse the repository at this point in the history
change package manager
  • Loading branch information
shiffman authored Jul 21, 2023
2 parents b751612 + b89ccb0 commit f875305
Show file tree
Hide file tree
Showing 5 changed files with 3,701 additions and 5,830 deletions.
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
## Setup

This build uses node version 18.15.0 and npm version.
Install nvm and run the following commands:
This build uses node version 18.15.0.
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.

[Install nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following commands:

```
nvm install 18.15
nvm use 18
npm install -g yarn
```

To start the development server, run the following commands:

```
npm install
npm start
yarn
yarn start
```

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

```
npm run format
yarn run format
```

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

```
npm install
npm run build
yarn
yarn run build
```

This will create a production version of the library in `/dist` directory.
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ Welcome to the next-generation repo for the ml5.js project! Due to the complexit

## Setup

This build uses node version 18.15.0 and npm version.
Install nvm and run the following commands:
This build uses node version 18.15.0.
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.

[Install nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following commands:

```
nvm install 18.15
nvm use 18
npm install -g yarn
```

To start the development server, run the following commands:

```
npm install
npm start
yarn
yarn start
```

You should see something similar to this in the terminal:
Expand Down
Loading

0 comments on commit f875305

Please sign in to comment.