diff --git a/boilerplates/lerna-module/README.md b/boilerplates/lerna-module/README.md index ca02f3f9e..c31f4c675 100644 --- a/boilerplates/lerna-module/README.md +++ b/boilerplates/lerna-module/README.md @@ -22,11 +22,20 @@ npm install __MODULENAME__ When first cloning the repo: -``` +```sh yarn +# build the prod packages. When devs would like to navigate to the source code, this will only navigate from references to their definitions (.d.ts files) between packages. yarn build ``` +Or if you want to make your dev process smoother, you can run: + +```sh +yarn +# build the dev packages with .map files, this enables navigation from references to their source code between packages. +yarn build:dev +``` + ## Related Checkout these related projects: diff --git a/boilerplates/lerna-module/package.json b/boilerplates/lerna-module/package.json index ac20aefb3..452380da2 100644 --- a/boilerplates/lerna-module/package.json +++ b/boilerplates/lerna-module/package.json @@ -24,6 +24,7 @@ "clean": "rimraf dist/**", "prepare": "npm run build", "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy", + "build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy", "lint": "eslint . --fix", "test": "jest", "test:watch": "jest --watch" diff --git a/boilerplates/lerna-workspace/README.md b/boilerplates/lerna-workspace/README.md index f50f5c833..c31f4c675 100644 --- a/boilerplates/lerna-workspace/README.md +++ b/boilerplates/lerna-workspace/README.md @@ -20,13 +20,22 @@ npm install __MODULENAME__ ## Developing - When first cloning the repo: -``` + +```sh yarn +# build the prod packages. When devs would like to navigate to the source code, this will only navigate from references to their definitions (.d.ts files) between packages. yarn build ``` +Or if you want to make your dev process smoother, you can run: + +```sh +yarn +# build the dev packages with .map files, this enables navigation from references to their source code between packages. +yarn build:dev +``` + ## Related Checkout these related projects: diff --git a/boilerplates/lerna-workspace/package.json b/boilerplates/lerna-workspace/package.json index f0a7a9adf..fbdbbcfb5 100644 --- a/boilerplates/lerna-workspace/package.json +++ b/boilerplates/lerna-workspace/package.json @@ -17,6 +17,7 @@ "scripts": { "clean": "lerna run clean", "build": "lerna run build --stream", + "build:dev": "lerna run build:dev --stream; yarn symlink", "lint": "lerna run lint --parallel", "symlink": "symlink-workspace --logLevel error", "postinstall": "yarn symlink"