mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 07:32:02 +00:00
remove storybook
This commit is contained in:
parent
9d806e7ad8
commit
c86e81dcca
12 changed files with 1857 additions and 11049 deletions
|
|
@ -1,27 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
const React = require('react');
|
|
||||||
const classnames = require('classnames');
|
|
||||||
const Route = require('stremio-router/Route');
|
|
||||||
const { RouteFocusedProvider } = require('stremio-router/RouteFocusedContext');
|
|
||||||
const ToastProvider = require('stremio/common/Toast/ToastProvider');
|
|
||||||
const appStyles = require('stremio/App/styles');
|
|
||||||
const styles = require('./styles');
|
|
||||||
|
|
||||||
const RouterDecorator = ({ children }) => (
|
|
||||||
<div id={'app'}>
|
|
||||||
<ToastProvider>
|
|
||||||
<div className={classnames('routes-container', appStyles['router'])}>
|
|
||||||
<RouteFocusedProvider value={true}>
|
|
||||||
<Route>
|
|
||||||
<div className={styles['route-content-container']}>
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
</Route>
|
|
||||||
</RouteFocusedProvider>
|
|
||||||
</div>
|
|
||||||
</ToastProvider>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
module.exports = RouterDecorator;
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
const RouterDecorator = require('./RouterDecorator');
|
|
||||||
|
|
||||||
module.exports = RouterDecorator;
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
@import (reference) '~@stremio/stremio-colors/less/stremio-colors.less';
|
|
||||||
@import (reference) '~stremio/common/screen-sizes.less';
|
|
||||||
|
|
||||||
.route-content-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-color: @color-background-dark2;
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
const appConfig = require('../webpack.config.js')({}, { mode: 'development' });
|
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
webpackFinal: async (storybookConfig) => {
|
|
||||||
storybookConfig.module = {
|
|
||||||
...storybookConfig.module,
|
|
||||||
rules: [
|
|
||||||
...storybookConfig.module.rules,
|
|
||||||
...appConfig.module.rules
|
|
||||||
]
|
|
||||||
};
|
|
||||||
storybookConfig.resolve = {
|
|
||||||
...storybookConfig.resolve,
|
|
||||||
extensions: [
|
|
||||||
...storybookConfig.resolve.extensions,
|
|
||||||
...appConfig.resolve.extensions
|
|
||||||
],
|
|
||||||
alias: {
|
|
||||||
...storybookConfig.resolve.alias,
|
|
||||||
...appConfig.resolve.alias
|
|
||||||
}
|
|
||||||
};
|
|
||||||
storybookConfig.plugins = [
|
|
||||||
...storybookConfig.plugins,
|
|
||||||
new MiniCssExtractPlugin()
|
|
||||||
];
|
|
||||||
|
|
||||||
return storybookConfig;
|
|
||||||
},
|
|
||||||
core: {
|
|
||||||
builder: 'webpack5',
|
|
||||||
},
|
|
||||||
stories: ['../src/stories/**/*.@(js)'],
|
|
||||||
};
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
const React = require('react');
|
|
||||||
const { withConsole } = require('@storybook/addon-console');
|
|
||||||
const { addDecorator, addParameters, configure } = require('@storybook/react');
|
|
||||||
const { jsxDecorator } = require('storybook-addon-jsx');
|
|
||||||
const RouterDecorator = require('./RouterDecorator');
|
|
||||||
require('spatial-navigation-polyfill');
|
|
||||||
require('./styles');
|
|
||||||
|
|
||||||
window.top.__spatialNavigation__ = {
|
|
||||||
keyMode: 'ARROW'
|
|
||||||
};
|
|
||||||
|
|
||||||
addParameters({
|
|
||||||
jsx: {
|
|
||||||
indent_size: 4,
|
|
||||||
showFunctions: false
|
|
||||||
}
|
|
||||||
});
|
|
||||||
addDecorator((renderStory, context) => jsxDecorator(renderStory, context));
|
|
||||||
addDecorator((renderStory, context) => withConsole()(renderStory)(context));
|
|
||||||
addDecorator((renderStory) => (
|
|
||||||
<RouterDecorator>
|
|
||||||
{renderStory()}
|
|
||||||
</RouterDecorator>
|
|
||||||
));
|
|
||||||
configure(() => {
|
|
||||||
require('../src/stories');
|
|
||||||
}, module);
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
:global(#root) {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
12752
package-lock.json
generated
12752
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,8 +9,7 @@
|
||||||
"start": "webpack serve --mode development",
|
"start": "webpack serve --mode development",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"lint": "eslint src",
|
"lint": "eslint src"
|
||||||
"storybook": "start-storybook --ci -p 6006"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "7.12.5",
|
"@babel/runtime": "7.12.5",
|
||||||
|
|
@ -39,10 +38,6 @@
|
||||||
"@babel/plugin-proposal-object-rest-spread": "7.12.1",
|
"@babel/plugin-proposal-object-rest-spread": "7.12.1",
|
||||||
"@babel/preset-env": "7.12.10",
|
"@babel/preset-env": "7.12.10",
|
||||||
"@babel/preset-react": "7.12.10",
|
"@babel/preset-react": "7.12.10",
|
||||||
"@storybook/addon-actions": "6.2.8",
|
|
||||||
"@storybook/addon-console": "1.2.3",
|
|
||||||
"@storybook/builder-webpack5": "6.2.8",
|
|
||||||
"@storybook/react": "6.2.8",
|
|
||||||
"@testing-library/react": "9.4.0",
|
"@testing-library/react": "9.4.0",
|
||||||
"@testing-library/react-hooks": "3.2.1",
|
"@testing-library/react-hooks": "3.2.1",
|
||||||
"babel-loader": "8.2.2",
|
"babel-loader": "8.2.2",
|
||||||
|
|
@ -62,7 +57,6 @@
|
||||||
"postcss-loader": "4.1.0",
|
"postcss-loader": "4.1.0",
|
||||||
"react-test-renderer": "16.13.0",
|
"react-test-renderer": "16.13.0",
|
||||||
"readdirp": "3.6.0",
|
"readdirp": "3.6.0",
|
||||||
"storybook-addon-jsx": "7.3.9",
|
|
||||||
"terser-webpack-plugin": "5.0.3",
|
"terser-webpack-plugin": "5.0.3",
|
||||||
"webpack": "5.31.2",
|
"webpack": "5.31.2",
|
||||||
"webpack-cli": "4.6.0",
|
"webpack-cli": "4.6.0",
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
const React = require('react');
|
|
||||||
const { storiesOf } = require('@storybook/react');
|
|
||||||
const Stream = require('stremio/routes/MetaDetails/StreamsList/Stream');
|
|
||||||
const styles = require('./styles');
|
|
||||||
|
|
||||||
storiesOf('Stream', module).add('Stream', () => (
|
|
||||||
<Stream
|
|
||||||
className={styles['stream-container']}
|
|
||||||
addonName={'Sample addon name'}
|
|
||||||
title={'1080p'}
|
|
||||||
thumbnail={'images/anonymous.png'}
|
|
||||||
progress={0.6}
|
|
||||||
/>
|
|
||||||
));
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
require('./Stream');
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
.stream-container {
|
|
||||||
flex: none;
|
|
||||||
width: 28rem;
|
|
||||||
margin: 2rem;
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
|
||||||
|
|
||||||
require('./Stream');
|
|
||||||
Loading…
Reference in a new issue