1
0
Эх сурвалжийг харах

chore: Rename development scripts from "start" to "dev"

This is more descriptive and more inline with most developers'
expectations.
Michael Bromley 1 жил өмнө
parent
commit
54f6c7c4c4

+ 3 - 3
README.md

@@ -98,7 +98,7 @@ you need to run the `postgres_16` container and then run `DB=postgres npm run po
 
 ```
 cd packages/dev-server
-[DB=mysql|postgres|sqlite] npm run start
+[DB=mysql|postgres|sqlite] npm run dev
 ```
 
 ### Testing admin ui changes locally
@@ -106,7 +106,7 @@ cd packages/dev-server
 If you are making changes to the admin ui, you need to start the admin ui independent from the dev-server:
 
 1. `cd packages/admin-ui`
-2. `npm run start`
+2. `npm run dev`
 3. Go to http://localhost:4200 and log in with "superadmin", "superadmin"
 
 This will auto restart when you make changes to the admin ui. You don't need this step when you just use the admin ui just
@@ -137,7 +137,7 @@ npm run watch:core-common
 ```shell
 # Terminal 2
 cd packages/dev-server
-DB=sqlite npm run start
+DB=sqlite npm run dev
 ```
 
 3. The dev-server will now have your local changes from the changed package.

+ 0 - 1
package.json

@@ -15,7 +15,6 @@
     "docs:build": "npm run docs:generate-typescript-docs && npm run docs:generate-graphql-docs",
     "codegen": "tsc -p scripts/codegen/plugins && ts-node scripts/codegen/generate-graphql-types.ts",
     "version": "npm run check-imports && npm run check-angular-versions && npm run build && npm run check-core-type-defs && npm run generate-changelog && git add CHANGELOG* && git add */version.ts",
-    "dev-server:start": "cd packages/dev-server && npm run start",
     "test": "lerna run test --stream --no-bail",
     "e2e": "lerna run e2e --stream --no-bail",
     "build": "lerna run build",

+ 1 - 1
packages/admin-ui/README.md

@@ -46,5 +46,5 @@ This report data is also saved to the [i18n-coverage.json](./i18n-coverage.json)
 
 To add support for a new language, create a new empty json file (`{}`) in the `i18n-messages` directory named `<languageCode>.json`, where `languageCode` is one of the supported codes as given in the [LanguageCode enum type](../core/src/api/schema/common/language-code.graphql), then run `npm run extract-translations`
 
-To verify localization changes add `<languageCode>.json` to `./src/lib/static/vendure-ui-config.json` in the array `availableLanguages`. This will make the localization available in Admin UI development mode using `npm run start`
+To verify localization changes add `<languageCode>.json` to `./src/lib/static/vendure-ui-config.json` in the array `availableLanguages`. This will make the localization available in Admin UI development mode using `npm run dev`
 

+ 1 - 1
packages/admin-ui/package.json

@@ -4,7 +4,7 @@
     "license": "GPL-3.0-or-later",
     "scripts": {
         "ng": "ng",
-        "start": "node scripts/set-version.js && ng serve",
+        "dev": "node scripts/set-version.js && ng serve",
         "build:app": "ng build vendure-admin --configuration production",
         "build": "node scripts/copy-package-json.js && node scripts/set-version.js && node scripts/build-public-api.js && ng build vendure-admin-lib --configuration production && node scripts/compile-styles.js",
         "watch": "ng build --watch=true",

+ 11 - 8
packages/dev-server/README.md

@@ -4,12 +4,18 @@ This package is not published to npm. It is used in development of the Vendure s
 
 ### Running
 
-To run the server, run the `start` script. The database configuration can be specified by the `DB=<type>` environment variable:
+Ensure you have a database running. From the root directory, run:
 
 ```bash
-DB=mysql npm run start
-DB=postgres npm run start
-DB=sqlite npm run start
+docker-compose up -d mariadb
+```
+
+To run the server, run the `dev` script. The database configuration can be specified by the `DB=<type>` environment variable:
+
+```bash
+cd packages/dev-server
+
+[DB=mysql|postgres|sqlite] npm run dev
 ```
 
 The default if no db is specified is mysql.
@@ -21,7 +27,7 @@ Test data can be populated by running the `populate` script. This uses the same
 Specify the database as above to populate that database:
 
 ```bash
-DB=sqlite npm run populate
+[DB=mysql|postgres|sqlite] npm run populate
 ```
 
 ## Testing custom ui extension compilation
@@ -35,9 +41,6 @@ the [temporary admin ui `tsconfig.json`](./custom-admin-ui/tsconfig.json) file:
   }
 ```
 
-
-
-
 ## Load testing
 
 This package also contains scripts for load testing the Vendure server. The load testing infrastructure and scripts are located in the [`./load-testing`](./load-testing) directory.

+ 3 - 3
packages/dev-server/package.json

@@ -6,9 +6,9 @@
     "private": true,
     "scripts": {
         "populate": "node -r ts-node/register -r dotenv/config populate-dev-server.ts",
-        "run:server": "node -r ts-node/register -r dotenv/config index.ts",
-        "run:worker": "node -r ts-node/register -r dotenv/config index-worker.ts",
-        "start": "concurrently npm:run*",
+        "dev:server": "node -r ts-node/register -r dotenv/config index.ts",
+        "dev:worker": "node -r ts-node/register -r dotenv/config index-worker.ts",
+        "dev": "concurrently npm:dev*",
         "load-test:1k": "node -r ts-node/register load-testing/run-load-test.ts 1000",
         "load-test:10k": "node -r ts-node/register load-testing/run-load-test.ts 10000",
         "load-test:100k": "node -r ts-node/register load-testing/run-load-test.ts 100000"