Skip to content

Commit

Permalink
upgrade dependencies & update folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothpandian committed Aug 24, 2021
1 parent a7c917c commit 2522238
Show file tree
Hide file tree
Showing 34 changed files with 2,423 additions and 3,750 deletions.
9 changes: 8 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
module.exports = {
stories: [],
addons: ['@storybook/addon-knobs/register'],
addons: ['@storybook/addon-essentials'],
// uncomment the property below if you want to apply some webpack config globally
// webpackFinal: async (config, { configType }) => {
// // Make whatever fine-grained changes you need that should apply to all storybook configs

// // Return the altered config
// return config;
// },
};
12 changes: 0 additions & 12 deletions .storybook/webpack.config.js

This file was deleted.

17 changes: 0 additions & 17 deletions apps/react-sketch-canvas-e2e/.eslintrc.json

This file was deleted.

13 changes: 0 additions & 13 deletions apps/react-sketch-canvas-e2e/cypress.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/react-sketch-canvas-e2e/src/fixtures/example.json

This file was deleted.

22 changes: 0 additions & 22 deletions apps/react-sketch-canvas-e2e/src/plugins/index.js

This file was deleted.

33 changes: 0 additions & 33 deletions apps/react-sketch-canvas-e2e/src/support/commands.ts

This file was deleted.

17 changes: 0 additions & 17 deletions apps/react-sketch-canvas-e2e/src/support/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions apps/react-sketch-canvas-e2e/tsconfig.e2e.json

This file was deleted.

10 changes: 0 additions & 10 deletions apps/react-sketch-canvas-e2e/tsconfig.json

This file was deleted.

4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { getJestProjects } = require('@nrwl/jest');

module.exports = {
projects: [, '<rootDir>/libs/react-sketch-canvas'],
projects: getJestProjects(),
};
6 changes: 5 additions & 1 deletion libs/react-sketch-canvas/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
}
]
],
"plugins": []
"plugins": [
["@babel/plugin-proposal-class-properties", { "loose": false }],
["@babel/plugin-proposal-private-methods", { "loose": false }],
["@babel/plugin-proposal-private-property-in-object", { "loose": false }]
]
}
26 changes: 18 additions & 8 deletions libs/react-sketch-canvas/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
const rootMain = require('../../../.storybook/main');

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

rootMain.stories.push(
...[
'../src/stories/**/*.stories.mdx',
'../src/stories/**/*.stories.@(js|jsx|ts|tsx)',
]
);
stories: [
...rootMain.stories,
'../src/stories/*.stories.mdx',
'../src/stories/*.stories.@(js|jsx|ts|tsx)',
],
addons: [...rootMain.addons, '@nrwl/react/plugins/storybook'],
webpackFinal: async (config, { configType }) => {
// apply any global webpack configs that might have been specified in .storybook/main.js
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}

module.exports = rootMain;
// add your own webpack tweaks if needed

return config;
},
};
16 changes: 12 additions & 4 deletions libs/react-sketch-canvas/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import { withKnobs } from '@storybook/addon-knobs';
import { addDecorator, addParameters } from '@storybook/react';

addDecorator(withKnobs);
import { addParameters } from '@storybook/react';

addParameters({
layout: 'centered',
viewMode: 'docs',
controls: {
matchers: {
color: /(color)$/i,
date: /Date$/,
},
},
docs: {
source: {
type: 'code',
},
},
});
4 changes: 4 additions & 0 deletions libs/react-sketch-canvas/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"emitDecoratorMetadata": true,
"outDir": ""
},
"files": [
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": [
"../**/*.spec.ts",
"../**/*.spec.js",
Expand Down
84 changes: 0 additions & 84 deletions libs/react-sketch-canvas/.storybook/webpack.config.js

This file was deleted.

11 changes: 2 additions & 9 deletions libs/react-sketch-canvas/src/lib/Canvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,8 @@ export class Canvas extends React.Component<CanvasProps> {
/* Finally!!! Render method */

render(): JSX.Element {
const {
width,
height,
className,
canvasColor,
background,
style,
paths,
} = this.props;
const { width, height, className, canvasColor, background, style, paths } =
this.props;

return (
<div
Expand Down
Loading

0 comments on commit 2522238

Please sign in to comment.