UNPKG

3.88 kBMarkdownView Raw
1# React Transcript Editor
2
3<!-- _One liner_ -->
4A React component to make transcribing audio and video easier and faster.
5
6_--> Work in progress <--_
7
8<!-- _Screenshot of UI - optional_ -->
9
10## Development env
11
12 <!-- _How to run the development environment_ -->
13
14- npm > `6.1.0`
15- [Node 10 - dubnium](https://scotch.io/tutorials/whats-new-in-node-10-dubnium)
16
17Node version is set in node version manager [`.nvmrc`](https://github.com/creationix/nvm#nvmrc)
18
19<!-- _Coding style convention ref optional, eg which linter to use_ -->
20
21<!-- _Linting, github pre-push hook - optional_ -->
22
23
24## Setup
25
26<!-- _stack - optional_ -->
27<!-- _How to build and run the code/app_ -->
28
29Fork this repository + git clone + cd into folder
30
31## Usage - development
32
33<!-- git clone git@github.com:bbc/react-transcript-editor.git -->
34
35> To start the development server (with entry point `src/index.js`), run
36
37```
38npm start
39```
40
41
42## Usage - production
43
44<!-- npm install react-transcript-editor -->
45
46<!-- exampel usage - require etc.. -->
47
48## System Architecture
49
50<!-- _High level overview of system architecture_ -->
51
52uses [`create-component-lib`](https://www.npmjs.com/package/create-component-lib) as explaied in this [blog post](https://hackernoon.com/creating-a-library-of-react-components-using-create-react-app-without-ejecting-d182df690c6b) to setup the environment to develop this React.
53
54This uses [Create React App 2.0](https://reactjs.org/blog/2018/10/01/create-react-app-v2.html) so we are using [CSS Modules](https://github.com/css-modules/css-modules) to contain the scope of the css for this component.
55<!--
56Uses CSS grid-layout https://medium.com/samsung-internet-dev/common-responsive-layouts-with-css-grid-and-some-without-245a862f48df -->
57
58> Place everything you want to publish to npm inside `src/lib`.
59
60> Outside `src/lib` (but inside src/), you can create example web pages to test or demonstrate the usage of your components.
61
62## Documentation
63
64There's a [docs](./docs) folder in this repository.
65
66[docs/notes](./docs/notes) contains dev notes on various aspects of the project.
67
68[docs/adr](./docs/adr) contains [Architecture Decision Record](https://github.com/joelparkerhenderson/architecture_decision_record).
69
70> An architectural decision record (ADR) is a document that captures an important architectural decision made along with its context and consequences.
71
72We are using [this template for ADR](https://gist.github.com/iaincollins/92923cc2c309c2751aea6f1b34b31d95)
73
74
75## Build
76
77<!-- _How to run build_ -->
78
79> To transpile `src/lib` and create a build in the dist folder, run:
80
81```
82npm run build:component
83```
84
85## Demo
86
87Demo can be viewed at [https://bbc.github.io/react-transcript-editor](https://bbc.github.io/react-transcript-editor)
88
89<!-- https://github.com/gitname/react-gh-pages
90-->
91
92
93## build - demo
94
95This github repository uses [github pages](https://pages.github.com/) to host a demo of the component, in [docs/demo](./docs/demo)
96
97```
98npm run deploy:ghpages
99```
100
101add to git, and push to origin master to update
102
103<!-- https://help.github.com/articles/user-organization-and-project-pages/#project-pages-sites -->
104
105Alternatively If you simply want to build the demo locally in the `build` folder then just
106
107```
108npm run build:example
109```
110
111## Tests
112
113<!-- _How to carry out tests_ -->
114
115Test coverage using [`jest`](https://jestjs.io/), to run tests
116
117 ```
118 npm run test
119 ```
120
121## Deployment
122
123<!-- _How to deploy the code/app into test/staging/production_ -->
124
125To push to [`npm`](https://npmjs.com)
126
127```
128npm publish
129```
130
131> Note that only `README.md` and the `dist` folders are published to npm.
132
133
134
135## Contributing
136
137<!-- Contributing guidance, and link to contributing code of conduct -->
138
139## Licence
140
141<!-- mention MIT Licence -->
142
143
144<!-- ## Legal Disclaimer
145
146Despite using React and Draftjs, the BBC is not promoting any FB product or other commercial interest. -->
\No newline at end of file