From 650c7183c8a1573dfed31b48d5b2c7a8b2d534f5 Mon Sep 17 00:00:00 2001 From: soumik-mukherjee <60540758+soumik-mukherjee@users.noreply.github.com> Date: Sat, 18 Apr 2020 22:22:13 +0530 Subject: [PATCH] added build and serve scripts to root, updated readme --- README.md | 23 ++++++++++++++++++++--- package.json | 4 +++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cc58abe..5997a9e 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,28 @@ The `component library` comes bundled with [storybook](https://storybook.js.org/ To run the `storybook` server, execute from the repo root dir -> yarn run:ui-stories +```bash +$ yarn run:ui-stories +``` -To run the `gatsby` app, execute from the repo root dir +To run a `development` server with the `gatsby` app, execute from the repo root dir + +```bash +$ yarn develop:webapp +``` + +To build the `gatsby` web app, i.e. `production` build (this creates the html, css and js bundles in the `packages/webapp/public` folder), execute from the repo root dir + +```bash +$ yarn build:webapp +``` + +You can also run a local server to check out your `production` build, with + +```bash +$ yarn serve:webapp +``` -> yarn develop:webapp ### Submitting PRs diff --git a/package.json b/package.json index b4089e0..19299d4 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "scripts": { "develop:webapp": "yarn workspace @project/webapp develop", "clean:webapp": "yarn workspace @project/webapp clean", - "run:ui-stories": "yarn workspace @project/ui-components storybook" + "run:ui-stories": "yarn workspace @project/ui-components storybook", + "build:webapp": "yarn workspace @project/webapp build", + "serve:webapp": "yarn workspace @project/webapp serve" }, "devDependencies": { "lerna": "^3.20.2"