refactor: monorepo setup with lerna (#243)
This commit is contained in:
committed by
GitHub
parent
dac29fbf3c
commit
504d95c34f
@ -11,60 +11,67 @@ For details on contributing to documentation, see [Website Directory Readme](htt
|
||||
|
||||
### Install dependencies
|
||||
|
||||
> Only required on the first run, subsequent runs can use `yarn start` to both bootstrap and run the development server.
|
||||
> Only required on the first run, subsequent runs can use `yarn dev` to both bootstrap and run the development server.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/StaticJsCMS/static-cms
|
||||
cd static-cms
|
||||
yarn
|
||||
cd core
|
||||
yarn
|
||||
```
|
||||
|
||||
### Run core locally
|
||||
|
||||
> In `core` directory
|
||||
### Run locally
|
||||
|
||||
```sh
|
||||
cd core # if not there already
|
||||
yarn start
|
||||
yarn dev
|
||||
```
|
||||
|
||||
## Available scripts
|
||||
|
||||
### start
|
||||
### dev
|
||||
|
||||
Starts the development server. This task runs both the `clean` and `develop` scripts.
|
||||
Starts the development server.
|
||||
|
||||
```sh
|
||||
cd core # if not there already
|
||||
yarn start
|
||||
```
|
||||
|
||||
### clean
|
||||
|
||||
Removes the `dist` directory.
|
||||
|
||||
```sh
|
||||
cd core # if not there already
|
||||
yarn clean
|
||||
yarn dev
|
||||
```
|
||||
|
||||
### build
|
||||
|
||||
Runs the `clean` script and builds the @static-cms/core.
|
||||
Runs the builds for packages.
|
||||
|
||||
```sh
|
||||
cd core # if not there already
|
||||
yarn build
|
||||
```
|
||||
|
||||
### test
|
||||
|
||||
Runs unit tests for packages.
|
||||
|
||||
```sh
|
||||
yarn test
|
||||
```
|
||||
|
||||
### test:integration
|
||||
|
||||
Runs integration tests for packages.
|
||||
|
||||
```sh
|
||||
yarn test:integration
|
||||
```
|
||||
|
||||
### lint
|
||||
|
||||
Lints core and docs according to our style guidelines.
|
||||
|
||||
```sh
|
||||
yarn lint
|
||||
```
|
||||
|
||||
### format
|
||||
|
||||
Formats code and docs according to our style guidelines.
|
||||
Formats core and docs according to our style guidelines.
|
||||
|
||||
```sh
|
||||
cd core # if not there already
|
||||
yarn format
|
||||
```
|
||||
|
||||
@ -86,7 +93,7 @@ Static CMS uses the [Forking Workflow](https://www.atlassian.com/git/tutorials/c
|
||||
|
||||
## Debugging
|
||||
|
||||
`yarn start` spawns a development server and uses `dev-test/config.yml` and `dev-test/index.html` to serve the CMS.
|
||||
`yarn dev` spawns a development server and uses `dev-test/config.yml` and `dev-test/index.html` to serve the CMS.
|
||||
In order to debug a specific issue follow the next steps:
|
||||
|
||||
1. Replace `dev-test/config.yml` with the relevant `config.yml`. If you want to test the backend, make sure that the `backend` property of the config indicates which backend you use (Github, Gitlab, Bitbucket etc) and path to the repo.
|
||||
@ -97,7 +104,7 @@ backend:
|
||||
repo: owner-name/repo-name
|
||||
```
|
||||
|
||||
2. Run `yarn start`
|
||||
2. Run `yarn dev`
|
||||
3. Open `http://localhost:8080/` in the browser and you should have access to the CMS
|
||||
|
||||
### Debugging Git Gateway
|
||||
|
Reference in New Issue
Block a user