Skip to content

Commit 4c4724f

Browse files
authored
Monorepo refactor (#130)
* Task: added lerna * WIP: storybook conversion * mend * WIP: adding MediaPlayer * move TimedTextEditor, TranscriptEditor and adapters util to packages (#128) * moved TimedTextEditor and TranscriptEditor to packages also created stories, and package.json for each, but can't test them in storybook coz they have dependencies on adapters in Util folder * moved Util and demdemo app * got storybook working * added demo app to storybook * mend * Fix: commenting out demo * Changed repo packages folder structure (#129) * cleaned up adapters * changed folder structure * fixed timecode converter duplice module * made all packages private except for TranscriptEditor * working * "Monorepo" refactor spike remove lerna (#135) * got storybook working tests not working yet * fixed tests using jest, and removed CRA dependency, updated babel config for babel 7 and stubbed css files for jest tests for css node modules * Added support for demo app in storybook * fixed eslint CRA had it's own linter internally, so added linting + dependencies * cleaned up export scripts in package.json * updated README * finalised refactor see PR description for more details * rename demo app editor to demoTranscript * bringing back style lint, and fixing lint in storybook config * updated with current master AWS adapter * linting * fix #132 playtime displaied double playtime on display is double of actual total playtime * temporary fix #73 monospace duration and current time in media player to stop moving while playing * Feature: Added custom css loading to storybook (#136) * Resolved conflict iwth AWS adapter
1 parent 1dd823f commit 4c4724f

File tree

133 files changed

+39534
-25793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+39534
-25793
lines changed

.babelrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"no-unused-expressions": "error",
1919
"no-trailing-spaces": "error",
2020
"no-nested-ternary": "error",
21-
"space-infix-ops": "error",
2221
"indent": ["warn", 2],
2322
"arrow-spacing": ["error", { "before": true, "after": true }],
2423
"space-in-parens": [ 0, "never" ],

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: pietrop
88
---
99

1010
**Describe the bug**
11-
A clear and concise description of what the bug is.
11+
<!-- A clear and concise description of what the bug is. -->
1212

1313
**To Reproduce**
1414
Steps to reproduce the behavior:
@@ -18,10 +18,10 @@ Steps to reproduce the behavior:
1818
4. See error
1919

2020
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
21+
<!-- A clear and concise description of what you expected to happen. -->
2222

2323
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
24+
<!-- If applicable, add screenshots to help explain your problem. -->
2525

2626
**Desktop (please complete the following information):**
2727
- OS: [e.g. iOS]
@@ -35,4 +35,4 @@ If applicable, add screenshots to help explain your problem.
3535
- Version [e.g. 22]
3636

3737
**Additional context**
38-
Add any other context about the problem here.
38+
<!-- Add any other context about the problem here. -->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ assignees: pietrop
88
---
99

1010
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1212

1313
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
14+
<!-- A clear and concise description of what you want to happen. -->
1515

1616
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
17+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1818

1919
**Additional context**
20-
Add any other context or screenshots about the feature request here.
20+
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ assignees: pietrop
77

88
---
99

10-
_where applicable, please provide context and use case around your question._
10+
<!-- _where applicable, please provide context and use case around your question._ -->

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,5 @@ typings/
8888

8989
# next.js build output
9090
.next
91+
92+
stats.json

.npmignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
src
2+
demo
3+
lib
4+
packages
5+
build
6+
.babelrc
7+
.babel.config.js
8+
webpack.config.js

.storybook/addons.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import '@storybook/addon-options/register';
2+
import '@storybook/addon-actions/register';
3+
import '@storybook/addon-links/register';

.storybook/config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { configure } from '@storybook/react';
2+
import { setOptions } from '@storybook/addon-options';
3+
4+
// automatically import all files ending in *.stories.js
5+
// https://webpack.js.org/guides/dependency-management/
6+
const components = require.context('../packages/components/', true, /.stories.js$/);
7+
const demo = require.context('../demo/', true, /.stories.js$/);
8+
const styles = require.context('./styles', true, /\.scss$/);
9+
10+
function loadStories() {
11+
demo.keys().forEach((filename) => demo(filename));
12+
components.keys().forEach((filename) => components(filename));
13+
styles.keys().forEach((filename) => styles(filename));
14+
}
15+
16+
setOptions({
17+
name: 'react-transcript-editor',
18+
url: 'https://github.com/bbc/react-transcript-editor',
19+
addonPanelInRight: true
20+
});
21+
22+
configure(loadStories, module);

.storybook/styles/fonts.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url('https://gel.files.bbci.co.uk/r2.302/bbc-reith.css');

0 commit comments

Comments
 (0)