Skip to content

Commit 2522238

Browse files
committed
upgrade dependencies & update folder structure
1 parent a7c917c commit 2522238

34 files changed

+2423
-3750
lines changed

.storybook/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
module.exports = {
22
stories: [],
3-
addons: ['@storybook/addon-knobs/register'],
3+
addons: ['@storybook/addon-essentials'],
4+
// uncomment the property below if you want to apply some webpack config globally
5+
// webpackFinal: async (config, { configType }) => {
6+
// // Make whatever fine-grained changes you need that should apply to all storybook configs
7+
8+
// // Return the altered config
9+
// return config;
10+
// },
411
};

.storybook/webpack.config.js

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

apps/react-sketch-canvas-e2e/.eslintrc.json

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

apps/react-sketch-canvas-e2e/cypress.json

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

apps/react-sketch-canvas-e2e/src/fixtures/example.json

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

apps/react-sketch-canvas-e2e/src/plugins/index.js

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

apps/react-sketch-canvas-e2e/src/support/commands.ts

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

apps/react-sketch-canvas-e2e/src/support/index.ts

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

apps/react-sketch-canvas-e2e/tsconfig.e2e.json

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

apps/react-sketch-canvas-e2e/tsconfig.json

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

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const { getJestProjects } = require('@nrwl/jest');
2+
13
module.exports = {
2-
projects: [, '<rootDir>/libs/react-sketch-canvas'],
4+
projects: getJestProjects(),
35
};

libs/react-sketch-canvas/.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@
88
}
99
]
1010
],
11-
"plugins": []
11+
"plugins": [
12+
["@babel/plugin-proposal-class-properties", { "loose": false }],
13+
["@babel/plugin-proposal-private-methods", { "loose": false }],
14+
["@babel/plugin-proposal-private-property-in-object", { "loose": false }]
15+
]
1216
}
Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
const rootMain = require('../../../.storybook/main');
22

3-
rootMain.addons.push(...['@storybook/addon-docs', '@storybook/preset-scss']);
3+
module.exports = {
4+
...rootMain,
45

5-
rootMain.stories.push(
6-
...[
7-
'../src/stories/**/*.stories.mdx',
8-
'../src/stories/**/*.stories.@(js|jsx|ts|tsx)',
9-
]
10-
);
6+
stories: [
7+
...rootMain.stories,
8+
'../src/stories/*.stories.mdx',
9+
'../src/stories/*.stories.@(js|jsx|ts|tsx)',
10+
],
11+
addons: [...rootMain.addons, '@nrwl/react/plugins/storybook'],
12+
webpackFinal: async (config, { configType }) => {
13+
// apply any global webpack configs that might have been specified in .storybook/main.js
14+
if (rootMain.webpackFinal) {
15+
config = await rootMain.webpackFinal(config, { configType });
16+
}
1117

12-
module.exports = rootMain;
18+
// add your own webpack tweaks if needed
19+
20+
return config;
21+
},
22+
};
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
import { withKnobs } from '@storybook/addon-knobs';
2-
import { addDecorator, addParameters } from '@storybook/react';
3-
4-
addDecorator(withKnobs);
1+
import { addParameters } from '@storybook/react';
52

63
addParameters({
74
layout: 'centered',
85
viewMode: 'docs',
6+
controls: {
7+
matchers: {
8+
color: /(color)$/i,
9+
date: /Date$/,
10+
},
11+
},
12+
docs: {
13+
source: {
14+
type: 'code',
15+
},
16+
},
917
});

libs/react-sketch-canvas/.storybook/tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"emitDecoratorMetadata": true,
55
"outDir": ""
66
},
7+
"files": [
8+
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
9+
"../../../node_modules/@nrwl/react/typings/image.d.ts"
10+
],
711
"exclude": [
812
"../**/*.spec.ts",
913
"../**/*.spec.js",

libs/react-sketch-canvas/.storybook/webpack.config.js

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

libs/react-sketch-canvas/src/lib/Canvas/index.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,8 @@ export class Canvas extends React.Component<CanvasProps> {
207207
/* Finally!!! Render method */
208208

209209
render(): JSX.Element {
210-
const {
211-
width,
212-
height,
213-
className,
214-
canvasColor,
215-
background,
216-
style,
217-
paths,
218-
} = this.props;
210+
const { width, height, className, canvasColor, background, style, paths } =
211+
this.props;
219212

220213
return (
221214
<div

0 commit comments

Comments
 (0)