chore: add build-preview task for local build testing (#1539)

This commit is contained in:
Shawn Erquhart 2018-07-28 17:26:47 -04:00 committed by GitHub
parent 892c51ce86
commit 75a32f528b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View File

@ -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.

View File

@ -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",

View File

@ -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",