Skip to content
Permalink
Browse files

Upgrade to storybook 5

  • Loading branch information...
jaredpalmer committed May 18, 2019
1 parent fa2bc4c commit 701643e6c0648acf6f56572ff2a3f4ad7e300392
Showing with 5,051 additions and 4,477 deletions.
  1. +1 βˆ’1 .storybook/config.js
  2. +19 βˆ’11 .storybook/example.stories.js
  3. +5 βˆ’5 .storybook/webpack.config.js
  4. +8 βˆ’5 package.json
  5. +33 βˆ’0 tsconfig.base.json
  6. +5 βˆ’33 tsconfig.json
  7. +1 βˆ’0 tsconfig.storybook.json
  8. +4,979 βˆ’4,422 yarn.lock
@@ -12,7 +12,7 @@ setOptions({
* URL for name in top left corner to link to
* @type {String}
*/
url: 'https://github.com/jaredpalerm/formik',
url: 'https://github.com/jaredpalmer/formik',
/**
* Show story component as full screen
* @type {Boolean}
@@ -14,17 +14,25 @@ import SyncValidation from '../examples/SyncValidation';
import FieldLevelValidation from '../examples/FieldLevelValidation';
import CombinedValidations from '../examples/CombinedValidations';

const AsyncValidationCode = require('!raw-loader!../examples/AsyncValidation');
const ArraysCode = require('!raw-loader!../examples/Arrays');
const BasicCode = require('!raw-loader!../examples/Basic.js');
const CustomInputsCode = require('!raw-loader!../examples/CustomInputs');
const ErrorMessageCode = require('!raw-loader!../examples/ErrorMessage');
const FastFieldCode = require('!raw-loader!../examples/FastField');
const MultistepWizardCode = require('!raw-loader!../examples/MultistepWizard');
const SchemaValidationCode = require('!raw-loader!../examples/SchemaValidation');
const SyncValidationCode = require('!raw-loader!../examples/SyncValidation');
const FieldLevelValidationCode = require('!raw-loader!../examples/FieldLevelValidation');
const CombinedValidationsCode = require('!raw-loader!../examples/CombinedValidations');
const AsyncValidationCode = require('!raw-loader!../examples/AsyncValidation')
.default;
const ArraysCode = require('!raw-loader!../examples/Arrays').default;
const BasicCode = require('!raw-loader!../examples/Basic.js').default;
const CustomInputsCode = require('!raw-loader!../examples/CustomInputs')
.default;
const ErrorMessageCode = require('!raw-loader!../examples/ErrorMessage')
.default;
const FastFieldCode = require('!raw-loader!../examples/FastField').default;
const MultistepWizardCode = require('!raw-loader!../examples/MultistepWizard')
.default;
const SchemaValidationCode = require('!raw-loader!../examples/SchemaValidation')
.default;
const SyncValidationCode = require('!raw-loader!../examples/SyncValidation')
.default;
const FieldLevelValidationCode = require('!raw-loader!../examples/FieldLevelValidation')
.default;
const CombinedValidationsCode = require('!raw-loader!../examples/CombinedValidations')
.default;

function cleanExample(str) {
return str
@@ -1,15 +1,15 @@
const { TsConfigPathsPlugin } = require('awesome-typescript-loader');

module.exports = (storybookBaseConfig, configType, defaultConfig) => {
defaultConfig.module.rules.push({
module.exports = async ({ config, mode }) => {
config.module.rules.push({
test: /\.tsx?$/,
loader: 'awesome-typescript-loader',
options: {
configFileName: 'tsconfig.storybook.json',
},
});
defaultConfig.resolve.extensions = ['.ts', '.tsx', '.js', '.jsx'];
defaultConfig.resolve.plugins = [new TsConfigPathsPlugin({})];
config.resolve.extensions = ['.ts', '.tsx', '.js', '.jsx'];
config.resolve.plugins = [new TsConfigPathsPlugin({})];

return defaultConfig;
return config;
};
@@ -57,8 +57,9 @@
},
"devDependencies": {
"@babel/core": "^7.1.2",
"@storybook/addon-options": "^3.4.8",
"@storybook/react": "^3.4.0",
"@storybook/addon-options": "^5.0.11",
"@storybook/addons": "^5.0.11",
"@storybook/react": "^5.0.11",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "^24.0.5",
"@types/lodash": "^4.14.119",
@@ -69,8 +70,9 @@
"@typescript-eslint/eslint-plugin": "^1.9.0",
"@typescript-eslint/parser": "^1.9.0",
"all-contributors-cli": "^4.4.0",
"awesome-typescript-loader": "^3.4.1",
"babel-eslint": "9.x",
"awesome-typescript-loader": "^5.2.1",
"babel-eslint": "10.0.1",
"babel-loader": "^8.0.6",
"cp-cli": "^1.1.2",
"cross-env": "5.0.5",
"doctoc": "^1.3.0",
@@ -86,13 +88,14 @@
"husky": "0.14.3",
"lint-staged": "4.0.2",
"prettier": "^1.17.1",
"raw-loader": "^0.5.1",
"raw-loader": "^2.0.0",
"react": "^16.9.0-alpha.0",
"react-dom": "^16.9.0-alpha.0",
"react-testing-library": "^7.0.0",
"rimraf": "^2.6.2",
"tsdx": "^0.5.11",
"typescript": "^3.4.5",
"webpack": "^4.31.0",
"yup": "0.21.3"
},
"lint-staged": {
@@ -0,0 +1,33 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"rootDir": "./",
"strict": true,
"pretty": true,
"removeComments": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"stripInternal": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": false,
"moduleResolution": "node",
"jsx": "react",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
},
"include": ["src", "types"],
"exclude": ["node_modules", "dist"]
}
@@ -1,38 +1,10 @@
{
"extends": "./tsconfig.base.json",
"include": ["src", "types", "test", "test/setupTests.ts"],
"compilerOptions": {
"target": "es5",
"module": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"rootDir": "./",
"strict": true,
"pretty": true,
"removeComments": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"stripInternal": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": false,
"moduleResolution": "node",
"baseUrl": "./",
"jsx": "react",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"paths": {
"*": ["src/*", "node_modules/*"]
},

},
"include": ["src", "types"],
"exclude": ["node_modules", "dist"]
"formik": ["src/"]
}
}
}
@@ -1,5 +1,6 @@
{
"extends": "./tsconfig.json",
"include": ["src", "./typings.d.ts", "types"],
"compilerOptions": {
"baseUrl": "./"
}

0 comments on commit 701643e

Please sign in to comment.
You can’t perform that action at this time.