Skip to content

Commit

Permalink
yarn -> npm
Browse files Browse the repository at this point in the history
  • Loading branch information
suchipi committed Apr 24, 2024
1 parent 00f80c5 commit e9b070d
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 23,112 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- uses: actions/checkout@v2

- name: Run tests
run: ./in-docker.sh 'yarn install && yarn build && yarn test'
run: ./in-docker.sh 'npm install && npm run build && npm test'
28 changes: 11 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,16 @@ Once you have forked the repo, use the following command to clone it onto your l
git clone https://github.com/<your-github-user-name>/hex-engine.git
```

Afterwards, `cd` into the newly-created `hex-engine` folder, and install the dependencies. Hex Engine use _yarn_ to manage dependencies. If you don't have _yarn_, you can install it with this command:
Afterwards, `cd` into the newly-created `hex-engine` folder, and install the dependencies. You can install the dependencies with this command:

```
npm install -g yarn
```

And then you can install the dependencies with this command:

```
yarn install
npm install
```

Now you can run the Hex Engine project with the following command:

```
yarn start
npm start
```

### Project Structure
Expand All @@ -75,11 +69,11 @@ This project is separated as multiple packages which you can find in the _packag
<!-- prettier-ignore -->
| Command | Function |
| -------- | --------- |
| `yarn start` | Builds all packages, watches them for changes, and rebuilds on change. Also, runs the sample game at port 8080, and the website at port 3000. |
| `yarn watch` | Same as `yarn start`. |
| `yarn clean` | Cleans all package build artifacts. |
| `yarn build` | Builds all packages in a way that is suitable for production distribution. |
| `yarn typecheck` | Runs TypeScript across the repo. |
| `yarn test-it` | Runs [Test-It](https://github.com/suchipi/test-it) on the repo. |
| `yarn test` | Runs `yarn typecheck` and then `yarn test-it`. |
| `yarn build-website` | Builds the website. The website is also built as part of `yarn build`, but this builds _only_ the website. This script is used to deploy the website. |
| `npm start` | Builds all packages, watches them for changes, and rebuilds on change. Also, runs the sample game at port 8080, and the website at port 3000. |
| `npm run watch` | Same as `npm start`. |
| `npm run clean` | Cleans all package build artifacts. |
| `npm run build` | Builds all packages in a way that is suitable for production distribution. |
| `npm run typecheck` | Runs TypeScript across the repo. |
| `npm run test-it` | Runs [Test-It](https://github.com/suchipi/test-it) on the repo. |
| `npm test` | Runs `npm run typecheck` and then `npm run test-it`. |
| `npm run build-website` | Builds the website. The website is also built as part of `npm run build`, but this builds _only_ the website. This script is used to deploy the website. |
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"clean": "workspace-builder clean",
"build": "workspace-builder",
"watch": "workspace-builder watch",
"start": "yarn watch",
"start": "npm run watch",
"typecheck": "tsc --noEmit",
"test-it": "node ./packages/scripts/dist/cli.js test './packages/*/src/**/*.test.{ts,js,tsx,jsx}' '!**/node_modules/**'",
"test": "yarn typecheck && yarn test-it",
"build-website": "cd packages/website && yarn build"
"test": "npm run typecheck && npm run test-it",
"build-website": "cd packages/website && npm run build"
},
"dependencies": {
"core-js": "^3.6.1",
Expand Down
1 change: 0 additions & 1 deletion packages/scripts/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default async function dev(options: {
config: webpackConfig,
devSocket,
urls,
useYarn: true,
useTypeScript: true,
tscCompileOnError: false,
webpack,
Expand Down
4 changes: 2 additions & 2 deletions packages/website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ This website was created with [Docusaurus](https://docusaurus.io/).

```sh
# Install dependencies
$ yarn
$ npm install
```

2. Run your dev server:

```sh
# Start the site
$ yarn start
$ npm run start
```

## Directory Structure
Expand Down
4 changes: 2 additions & 2 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"workspace-builder": "@workspace-builder/shell-command",
"@workspace-builder/shell-command": {
"build": "yarn build",
"watch": "yarn start"
"build": "npm run build",
"watch": "npm start"
}
}
Loading

0 comments on commit e9b070d

Please sign in to comment.