diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ead96aa1..a2f33148 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,6 +75,16 @@ Runs the `clean` script and builds the CMS packages. yarn build ``` +### `build-preview` + +Runs the `build` and `build-preview` scripts in each package and serves the resulting build locally. + +#### Usage + +```sh +yarn build-preview +``` + ### `test` Runs all the CMS package tests. diff --git a/package.json b/package.json index d428d681..8b662754 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "start": "npm run bootstrap && npm run watch", "watch": "lerna run watch --parallel", "build": "npm run clean && lerna run build", + "build-preview": "npm run build && lerna run build-preview", "clean": "rimraf packages/*/dist", "reset": "npm run clean && lerna clean --yes", "test": "cross-env NODE_ENV=test jest --no-cache", diff --git a/packages/netlify-cms/package.json b/packages/netlify-cms/package.json index 5143d984..8babb46e 100644 --- a/packages/netlify-cms/package.json +++ b/packages/netlify-cms/package.json @@ -8,7 +8,8 @@ "main": "dist/netlify-cms.js", "scripts": { "watch": "webpack-dev-server --hot --open", - "build": "cross-env NODE_ENV=production webpack" + "build": "cross-env NODE_ENV=production webpack", + "build-preview": "cross-env NODE_ENV=production webpack-dev-server --open" }, "keywords": [ "netlify",