Skip to content

Commit c54d859

Browse files
update docs to use npm by default
1 parent f6ea679 commit c54d859

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

starters/serverless-framework-sqs-dynamodb/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,32 @@ git clone https://github.com/thisdot/starter.dev.git
5858

5959
### Getting Started
6060

61-
This README uses `yarn` for commands. If you're using `npm` or `pnpm`, utilize the equivalent version of the commands.
61+
This README uses `npm` for commands. If you're using `yarn` or `pnpm`, utilize the equivalent version of the commands.
6262

6363
1. Create a `.env` file:
6464

6565
```bash
6666
cp .env.example .env
6767
```
6868

69-
2. Run `yarn` to install deps
69+
2. Run `npm i` to install deps
7070
3. Standup the project infrastructure using docker via:
7171

7272
```bash
73-
yarn infrastructure:up
73+
npm run infrastructure:up
7474
```
7575

7676
4. Sync database tables and seed the project via:
7777

7878
```bash
79-
yarn db:sync
80-
yarn db:seed
79+
npm run db:sync
80+
npm run db:seed
8181
```
8282

8383
5. Start the local development server:
8484

8585
```bash
86-
yarn start
86+
npm start
8787
```
8888

8989
6. Make changes and enjoy building your new backend!
@@ -96,7 +96,7 @@ yarn start
9696
- `deploy` ships the project to the configured AWS account using the Serverless Framework CLI command.
9797
- `start` runs the `serverless-offline` provided server for local development and testing. Be sure to have the local docker infrastructure running to emulate the related services.
9898
- `test` runs `jest` under the hood.
99-
- `lint` runs `eslint` under the hood. You can use all the eslint available command line arguments. To lint the entire project, run `yarn lint .`, or equivalent. You can affix `--fix` to auto-correct linting issues that eslint can handle.
99+
- `lint` runs `eslint` under the hood. You can use all the eslint available command line arguments. To lint the entire project, run `npm run lint .`, or equivalent. You can affix `--fix` to auto-correct linting issues that eslint can handle.
100100
- `format:check` runs prettier format checking on all project files.
101101
- `format:write` runs prettier format writing on all project files.
102102

@@ -165,11 +165,11 @@ This project comes configured with 3 default stages: `dev`, `staging`, `producti
165165

166166
#### esbuild
167167

168-
This project uses [serverless-esbuild](https://www.npmjs.com/package/serverless-esbuild) over its webpack counterpart. The esbuild tool chain is generally faster and requires less dependencies to work out of the box.
168+
This project uses [serverless-esbuild](https://www.npmjs.com/package/serverless-esbuild) over its webpack counterpart. The esbuild tool chain is generally faster and requires less dependencies to work out of the box. Currently, the tooling is configured to use `npm`. If you wish to use `yarn` or `pnpm`, please change the `packager` field in the configuration accordingly.
169169

170170
#### Bundle Analyzer
171171

172-
This project ships with the [serverless-analyze-bundle-plugin](https://www.npmjs.com/package/serverless-analyze-bundle-plugin) to allow you to visualize your Lambda bundles. This is an especially important factor when dealing with cold starts and should be monitored. To analyze a function bundle, run `yarn build --analyze <functionName>`. This will give you a visualization of your function's dependencies and their sizes.
172+
This project ships with the [serverless-analyze-bundle-plugin](https://www.npmjs.com/package/serverless-analyze-bundle-plugin) to allow you to visualize your Lambda bundles. This is an especially important factor when dealing with cold starts and should be monitored. To analyze a function bundle, run `npm run build --analyze <functionName>`. This will give you a visualization of your function's dependencies and their sizes.
173173

174174
#### File Patterns
175175

@@ -183,7 +183,7 @@ To help manage the database locally, the [`aaronshaf/dynamodb-admin`](https://gi
183183

184184
### Defining New Tables
185185

186-
To create a new table, define it via the `serverless.ts` resources section. It utilizes the [DynamoDB Cloudformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html) to define data. Table names should be defined per environment through the Serverless `params` config. Once your table is defined, use the `yarn db:sync` command to create the table.
186+
To create a new table, define it via the `serverless.ts` resources section. It utilizes the [DynamoDB Cloudformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html) to define data. Table names should be defined per environment through the Serverless `params` config. Once your table is defined, use the `npm run db:sync` command to create the table.
187187

188188
### Defining New Seeds
189189

@@ -203,7 +203,7 @@ seed: {
203203
}
204204
```
205205

206-
Once defined, run `yarn db:seed` to seed your database. See https://github.com/99x/serverless-dynamodb-local#seeding-sls-dynamodb-seed for more information.
206+
Once defined, run `npm run db:seed` to seed your database. See https://github.com/99x/serverless-dynamodb-local#seeding-sls-dynamodb-seed for more information.
207207

208208
### Streams
209209

starters/serverless-framework-sqs-dynamodb/serverless.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const serverlessConfiguration: AWS = {
3737
},
3838
},
3939
'esbuild': {
40-
packager: 'yarn',
40+
packager: 'npm',
4141
plugins: './esbuild-plugins.ts',
4242
bundle: true,
4343
minify: true,

0 commit comments

Comments
 (0)