Skip to content

Commit cf0ad28

Browse files
author
hirsch
committed
📝 Replace npm with yarn
1 parent ac5782b commit cf0ad28

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Install [Node.js and NPM](https://nodejs.org/en/download/)
8989
Install yarn globally
9090

9191
```bash
92-
npm install yarn -g
92+
yarn install yarn -g
9393
```
9494

9595
Install a MySQL database.
@@ -107,17 +107,17 @@ Create a new database with the name you have in your `.env`-file.
107107
Then setup your application environment.
108108

109109
```bash
110-
npm run setup
110+
yarn run setup
111111
```
112112

113113
> This installs all dependencies with yarn. After that it migrates the database and seeds some test data into it. So after that your development environment is ready to use.
114114
115115
### Step 3: Serve your App
116116

117-
Go to the project dir and start your app with this npm script.
117+
Go to the project dir and start your app with this yarn script.
118118

119119
```bash
120-
npm start serve
120+
yarn start serve
121121
```
122122

123123
> This starts a local server using `nodemon`, which will watch for any file changes and will restart the sever according to these changes.
@@ -135,42 +135,42 @@ All script are defined in the `package-scripts.js` file, but the most important
135135

136136
### Linting
137137

138-
- Run code quality analysis using `npm start lint`. This runs tslint.
138+
- Run code quality analysis using `yarn start lint`. This runs tslint.
139139
- There is also a vscode task for this called `lint`.
140140

141141
### Tests
142142

143-
- Run the unit tests using `npm start test` (There is also a vscode task for this called `test`).
144-
- Run the integration tests using `npm start test.integration`.
145-
- Run the e2e tests using `npm start test.e2e`.
143+
- Run the unit tests using `yarn start test` (There is also a vscode task for this called `test`).
144+
- Run the integration tests using `yarn start test.integration`.
145+
- Run the e2e tests using `yarn start test.e2e`.
146146

147147
### Running in dev mode
148148

149-
- Run `npm start serve` to start nodemon with ts-node, to serve the app.
149+
- Run `yarn start serve` to start nodemon with ts-node, to serve the app.
150150
- The server address will be displayed to you as `http://0.0.0.0:3000`
151151

152152
### Building the project and run it
153153

154-
- Run `npm start build` to generated all JavaScript files from the TypeScript sources (There is also a vscode task for this called `build`).
155-
- To start the builded app located in `dist` use `npm start`.
154+
- Run `yarn start build` to generated all JavaScript files from the TypeScript sources (There is also a vscode task for this called `build`).
155+
- To start the builded app located in `dist` use `yarn start`.
156156

157157
### Database Migration
158158

159159
- Run `typeorm migration:create -n <migration-file-name>` to create a new migration file.
160160
- Try `typeorm -h` to see more useful cli commands like generating migration out of your models.
161-
- To migrate your database run `npm start db.migrate`.
162-
- To revert your latest migration run `npm start db.revert`.
163-
- Drops the complete database schema `npm start db.drop`.
161+
- To migrate your database run `yarn start db.migrate`.
162+
- To revert your latest migration run `yarn start db.revert`.
163+
- Drops the complete database schema `yarn start db.drop`.
164164

165165
### Database Seeding
166166

167-
- Run `npm start db.seed` to seed your seeds into the database.
167+
- Run `yarn start db.seed` to seed your seeds into the database.
168168

169169
![divider](./w3tec-divider.png)
170170

171171
## ❯ Debugger in VSCode
172172

173-
To debug your code run `npm start build` or hit <kbd>cmd</kbd> + <kbd>b</kbd> to build your app.
173+
To debug your code run `yarn start build` or hit <kbd>cmd</kbd> + <kbd>b</kbd> to build your app.
174174
Then, just set a breakpoint and hit <kbd>F5</kbd> in your Visual Studio Code.
175175

176176
![divider](./w3tec-divider.png)
@@ -377,18 +377,18 @@ export class CreatePets implements SeedsInterface {
377377
The last step is the easiest, just hit the following command in your terminal, but be sure you are in the projects root folder.
378378
379379
```bash
380-
npm start db.seed
380+
yarn start db.seed
381381
```
382382
383383
#### CLI Interface
384384
385-
| Command | Description |
386-
| --------------------------------------------------- | ----------- |
387-
| `npm start "db.seed"` | Run all seeds |
388-
| `npm start "db.seed --run CreateBruce,CreatePets"` | Run specific seeds (file names without extension) |
389-
| `npm start "db.seed -L"` | Log database queries to the terminal |
390-
| `npm start "db.seed --factories <path>"` | Add a different path to your factories (Default: `src/database/`) |
391-
| `npm start "db.seed --seeds <path>"` | Add a different path to your seeds (Default: `src/database/seeds/`) |
385+
| Command | Description |
386+
| ---------------------------------------------------- | ----------- |
387+
| `yarn start "db.seed"` | Run all seeds |
388+
| `yarn start "db.seed --run CreateBruce,CreatePets"` | Run specific seeds (file names without extension) |
389+
| `yarn start "db.seed -L"` | Log database queries to the terminal |
390+
| `yarn start "db.seed --factories <path>"` | Add a different path to your factories (Default: `src/database/`) |
391+
| `yarn start "db.seed --seeds <path>"` | Add a different path to your seeds (Default: `src/database/seeds/`) |
392392
393393
![divider](./w3tec-divider.png)
394394

0 commit comments

Comments
 (0)