-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/pietrop/digital-paper-edi…
…t-storybook into pietrop-master # Conflicts: # package-lock.json
- Loading branch information
Showing
11 changed files
with
14,907 additions
and
8,251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
--- | ||
name: Question | ||
about: Ask a question about this project | ||
title: '' | ||
title: "" | ||
labels: question | ||
assignees: pietrop | ||
|
||
--- | ||
|
||
<!-- _where applicable, please provide context and use case around your question._ --> | ||
assignees: bbc | ||
---<!-- _where applicable, please provide context and use case around your question._ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,11 @@ See [here](https://github.com/bbc/digital-paper-edit-client#project-architecture | |
_How to build and run the code/app_ --> | ||
|
||
```sh | ||
git clone [email protected]:bbc/digital-paper-edit-react-components.git | ||
git clone [email protected]:bbc/digital-paper-edit-storybook.git | ||
``` | ||
|
||
```sh | ||
cd digital-paper-edit-react-components | ||
cd digital-paper-edit-storybook | ||
``` | ||
|
||
Optional step to setup [nvm](https://github.com/nvm-sh/nvm) to use node version 10, otherwise just use node version 10 | ||
|
@@ -37,19 +37,29 @@ npm install | |
|
||
## Usage - development | ||
|
||
Start the storybook | ||
|
||
```sh | ||
npm run start | ||
npm start | ||
``` | ||
|
||
Server API is listening on [`http://localhost:6006/`](http://localhost:6006) | ||
[Storybook](https://storybook.js.org/) is at [`http://localhost:6006/`](http://localhost:6006) | ||
|
||
- [ ] TODO: available on npm | ||
## Usage - production | ||
|
||
<!-- Available on `npm` [npm - `@bbc/react-transcript-editor`](https://www.npmjs.com/package/@bbc/react-transcript-editor) --> | ||
```sh | ||
npm install @bbc/digital-paper-edit-storybook | ||
``` | ||
|
||
<!-- ``` | ||
npm install @bbc/react-transcript-editor | ||
``` --> | ||
<!-- Example of import | ||
```js | ||
import 'Breadcrumb' from '@bbc/digital-paper-edit-storybook/Breadcrumb' | ||
<Breadcrumb /> | ||
``` | ||
--> | ||
|
||
## System Architecture | ||
|
||
|
@@ -76,13 +86,11 @@ Node version is set in node version manager [`.nvmrc`](https://github.com/creati | |
|
||
<!-- _How to run build_ --> | ||
|
||
- [ ] TODO | ||
|
||
<!-- > To transpile `./packages` and create a build in the `./dist` folder, run: | ||
To transpile `./src` and create a build in the `./dist` folder, run: | ||
|
||
```sh | ||
npm run build | ||
``` | ||
npm run build:component | ||
``` --> | ||
|
||
## Demo & storybook | ||
|
||
|
@@ -94,27 +102,21 @@ npm run build:component | |
To build the storybook as a static site | ||
|
||
```sh | ||
npm run build:storybook | ||
npm run build-storybook | ||
``` | ||
|
||
## Publish storybook & demo to github pages | ||
|
||
This github repository uses [github pages](https://pages.github.com/) to host the storybook and the demo of the component. **Make sure to commit and push any changes to MASTER before deploying to github pages.** | ||
|
||
```sh | ||
npm run deploy:ghpages | ||
npm run publish-ghpages | ||
``` | ||
|
||
Alternatively, if you simply want to build the demo locally in the `build` folder then just | ||
|
||
```sh | ||
npm run build:storybook | ||
``` | ||
|
||
you can then run this command to serve the static site locally | ||
|
||
```sh | ||
npm run build:storybook:serve | ||
npm run build-storybook | ||
``` | ||
|
||
## Tests | ||
|
@@ -127,33 +129,25 @@ Test coverage using [`jest`](https://jestjs.io/), to run tests | |
npm run test | ||
``` | ||
|
||
During development you can use | ||
|
||
``` | ||
npm run test:watch | ||
``` | ||
|
||
## Travis CI | ||
|
||
- [ ] TODO | ||
|
||
<!-- On commit this repo uses the [.travis.yml](./.travis.yml) config tu run the automated test on [travis CI](https://travis-ci.org/bbc/react-transcript-editor). --> | ||
On commit this repo uses the [.travis.yml](./.travis.yml) config tu run the automated test on [travis CI](https://travis-ci.org/bbc/digital-paper-edit-storybook). | ||
|
||
## Deployment | ||
|
||
<!-- _How to deploy the code/app into test/staging/production_ --> | ||
|
||
- [ ] TODO | ||
To push to [npm - `@bbc/digital-paper-edit-storybook`](https://www.npmjs.com/package/@bbc/digital-paper-edit-storybook) | ||
|
||
<!-- To push to [npm - `@bbc/react-transcript-editor`](https://www.npmjs.com/package/@bbc/react-transcript-editor) | ||
login into npm | ||
|
||
``` | ||
npm publish:public | ||
npm run publish-public | ||
``` | ||
|
||
This runs `npm run build:component` and `npm publish --access public` under the hood | ||
This runs `npm run build` and `npm publish --access public` under the hood | ||
|
||
> Note that only `README.md` and the `dist` folders are published to npm. --> | ||
> Note that only `README.md` and the `dist` folders are published to npm. | ||
## Contributing | ||
|
||
|
Oops, something went wrong.