1 | # React Transcript Editor
|
2 |
|
3 |
|
4 | A React component to make transcribing audio and video easier and faster.
|
5 |
|
6 | _--> Work in progress <--_
|
7 |
|
8 |
|
9 |
|
10 | ## Development env
|
11 |
|
12 |
|
13 |
|
14 | - npm > `6.1.0`
|
15 | - [Node 10 - dubnium](https://scotch.io/tutorials/whats-new-in-node-10-dubnium)
|
16 |
|
17 | Node version is set in node version manager [`.nvmrc`](https://github.com/creationix/nvm#nvmrc)
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | ## Setup
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | Fork this repository + git clone + cd into folder
|
30 |
|
31 | ## Usage - development
|
32 |
|
33 |
|
34 |
|
35 | > To start the development server (with entry point `src/index.js`), run
|
36 |
|
37 | ```
|
38 | npm start
|
39 | ```
|
40 |
|
41 |
|
42 | ## Usage - production
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | ## System Architecture
|
49 |
|
50 |
|
51 |
|
52 | uses [`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 |
|
54 | This 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 |
|
56 | Uses 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 |
|
64 | There'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 |
|
72 | We are using [this template for ADR](https://gist.github.com/iaincollins/92923cc2c309c2751aea6f1b34b31d95)
|
73 |
|
74 |
|
75 | ## Build
|
76 |
|
77 |
|
78 |
|
79 | > To transpile `src/lib` and create a build in the dist folder, run:
|
80 |
|
81 | ```
|
82 | npm run build:component
|
83 | ```
|
84 |
|
85 | ## Demo
|
86 |
|
87 | Demo can be viewed at [https://bbc.github.io/react-transcript-editor](https://bbc.github.io/react-transcript-editor)
|
88 |
|
89 |
|
90 | -->
|
91 |
|
92 |
|
93 | ## build - demo
|
94 |
|
95 | This github repository uses [github pages](https://pages.github.com/) to host a demo of the component, in [docs/demo](./docs/demo)
|
96 |
|
97 | ```
|
98 | npm run deploy:ghpages
|
99 | ```
|
100 |
|
101 | add to git, and push to origin master to update
|
102 |
|
103 |
|
104 |
|
105 | Alternatively If you simply want to build the demo locally in the `build` folder then just
|
106 |
|
107 | ```
|
108 | npm run build:example
|
109 | ```
|
110 |
|
111 | ## Tests
|
112 |
|
113 |
|
114 |
|
115 | Test 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 |
|
125 | To push to [`npm`](https://npmjs.com)
|
126 |
|
127 | ```
|
128 | npm 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 |
|
146 | Despite using React and Draftjs, the BBC is not promoting any FB product or other commercial interest. --> |
\ | No newline at end of file |