@papillonarts/setup 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel/index.d.ts +5 -0
- package/babel/index.d.ts.map +1 -0
- package/eslint/index.d.ts +80 -0
- package/eslint/index.d.ts.map +1 -0
- package/jest/config.d.ts +27 -0
- package/jest/config.d.ts.map +1 -0
- package/jest/index.d.ts +3 -0
- package/jest/index.d.ts.map +1 -0
- package/jest/setup.d.ts +2 -0
- package/jest/setup.d.ts.map +1 -0
- package/package.json +5 -3
- package/prettier/index.d.ts +6 -0
- package/prettier/index.d.ts.map +1 -0
- package/storybook/index.d.ts +4 -0
- package/storybook/index.d.ts.map +1 -0
- package/storybook/index.js +26 -0
- package/storybook/mainSetup.d.ts +8 -0
- package/storybook/mainSetup.d.ts.map +1 -0
- package/storybook/mainSetup.js +268 -0
- package/storybook/managerSetup.d.ts +5 -0
- package/storybook/managerSetup.d.ts.map +1 -0
- package/storybook/managerSetup.js +16 -0
- package/storybook/previewSetup.d.ts +10 -0
- package/storybook/previewSetup.d.ts.map +1 -0
- package/storybook/previewSetup.js +54 -0
- package/stylelint/index.d.ts +16 -0
- package/stylelint/index.d.ts.map +1 -0
- package/webpack/constant/index.d.ts +10 -0
- package/webpack/constant/index.d.ts.map +1 -0
- package/webpack/constant/index.js +15 -0
- package/webpack/{index.ts → index.d.ts} +24 -27
- package/webpack/index.d.ts.map +1 -0
- package/webpack/index.js +202 -0
- package/webpack/loader/babelLoader.d.ts +21 -0
- package/webpack/loader/babelLoader.d.ts.map +1 -0
- package/webpack/loader/babelLoader.js +31 -0
- package/webpack/loader/cssLoader.d.ts +14 -0
- package/webpack/loader/cssLoader.d.ts.map +1 -0
- package/webpack/loader/cssLoader.js +22 -0
- package/webpack/loader/fontLoader.d.ts +5 -0
- package/webpack/loader/fontLoader.d.ts.map +1 -0
- package/webpack/loader/fontLoader.js +14 -0
- package/webpack/loader/imageLoader.d.ts +5 -0
- package/webpack/loader/imageLoader.d.ts.map +1 -0
- package/webpack/loader/imageLoader.js +14 -0
- package/webpack/loader/markdownLoader.d.ts +11 -0
- package/webpack/loader/markdownLoader.d.ts.map +1 -0
- package/webpack/loader/markdownLoader.js +20 -0
- package/webpack/loader/postCSSLoader.d.ts +11 -0
- package/webpack/loader/postCSSLoader.d.ts.map +1 -0
- package/webpack/loader/postCSSLoader.js +22 -0
- package/webpack/loader/sassLoader.d.ts +14 -0
- package/webpack/loader/sassLoader.d.ts.map +1 -0
- package/webpack/loader/{sassLoader.ts → sassLoader.js} +14 -7
- package/webpack/loader/svgrLoader.d.ts +13 -0
- package/webpack/loader/svgrLoader.d.ts.map +1 -0
- package/webpack/loader/svgrLoader.js +25 -0
- package/webpack/plugin/bannerPlugin.d.ts +3 -0
- package/webpack/plugin/bannerPlugin.d.ts.map +1 -0
- package/webpack/plugin/bannerPlugin.js +16 -0
- package/webpack/plugin/cleanWebpackPlugin.d.ts +12 -0
- package/webpack/plugin/cleanWebpackPlugin.d.ts.map +1 -0
- package/webpack/plugin/cleanWebpackPlugin.js +31 -0
- package/webpack/plugin/copyWebpackPlugin.d.ts +6 -0
- package/webpack/plugin/copyWebpackPlugin.d.ts.map +1 -0
- package/webpack/plugin/copyWebpackPlugin.js +24 -0
- package/webpack/plugin/cssMinimizerWebpackPlugin.d.ts +3 -0
- package/webpack/plugin/cssMinimizerWebpackPlugin.d.ts.map +1 -0
- package/webpack/plugin/cssMinimizerWebpackPlugin.js +13 -0
- package/webpack/plugin/dotenvWebpack.d.ts +13 -0
- package/webpack/plugin/dotenvWebpack.d.ts.map +1 -0
- package/webpack/plugin/dotenvWebpack.js +35 -0
- package/webpack/plugin/hotModuleReplacementPlugin.d.ts +3 -0
- package/webpack/plugin/hotModuleReplacementPlugin.d.ts.map +1 -0
- package/webpack/plugin/hotModuleReplacementPlugin.js +13 -0
- package/webpack/plugin/htmlWebpackPlugin.d.ts +14 -0
- package/webpack/plugin/htmlWebpackPlugin.d.ts.map +1 -0
- package/webpack/plugin/htmlWebpackPlugin.js +42 -0
- package/webpack/plugin/miniCSSExtractPlugin.d.ts +5 -0
- package/webpack/plugin/miniCSSExtractPlugin.d.ts.map +1 -0
- package/webpack/plugin/miniCSSExtractPlugin.js +22 -0
- package/webpack/plugin/moduleConcatenationPlugin.d.ts +5 -0
- package/webpack/plugin/moduleConcatenationPlugin.d.ts.map +1 -0
- package/webpack/plugin/moduleConcatenationPlugin.js +13 -0
- package/webpack/plugin/webpackBundleAnalyzer.d.ts +2 -0
- package/webpack/plugin/webpackBundleAnalyzer.d.ts.map +1 -0
- package/webpack/plugin/webpackBundleAnalyzer.js +15 -0
- package/webpack/plugin/webpackManifestPlugin.d.ts +3 -0
- package/webpack/plugin/webpackManifestPlugin.d.ts.map +1 -0
- package/webpack/plugin/webpackManifestPlugin.js +21 -0
- package/webpack/server/devServer.d.ts +12 -0
- package/webpack/server/devServer.d.ts.map +1 -0
- package/webpack/server/devServer.js +21 -0
- package/webpack/setup/commonSetup.d.ts +53 -0
- package/webpack/setup/commonSetup.d.ts.map +1 -0
- package/webpack/setup/commonSetup.js +37 -0
- package/webpack/setup/developmentSetup.d.ts +8 -0
- package/webpack/setup/developmentSetup.d.ts.map +1 -0
- package/webpack/setup/developmentSetup.js +54 -0
- package/webpack/setup/productionSetup.d.ts +8 -0
- package/webpack/setup/productionSetup.d.ts.map +1 -0
- package/webpack/setup/productionSetup.js +59 -0
- package/storybook/index.ts +0 -3
- package/storybook/mainSetup.ts +0 -277
- package/storybook/managerSetup.ts +0 -9
- package/storybook/previewSetup.tsx +0 -50
- package/webpack/constant/index.ts +0 -24
- package/webpack/loader/babelLoader.ts +0 -38
- package/webpack/loader/cssLoader.ts +0 -13
- package/webpack/loader/fontLoader.ts +0 -8
- package/webpack/loader/imageLoader.ts +0 -8
- package/webpack/loader/markdownLoader.ts +0 -17
- package/webpack/loader/postCSSLoader.ts +0 -14
- package/webpack/loader/svgrLoader.ts +0 -17
- package/webpack/plugin/bannerPlugin.ts +0 -18
- package/webpack/plugin/cleanWebpackPlugin.ts +0 -27
- package/webpack/plugin/copyWebpackPlugin.ts +0 -18
- package/webpack/plugin/cssMinimizerWebpackPlugin.ts +0 -7
- package/webpack/plugin/dotenvWebpack.ts +0 -19
- package/webpack/plugin/hotModuleReplacementPlugin.ts +0 -7
- package/webpack/plugin/htmlWebpackPlugin.ts +0 -25
- package/webpack/plugin/miniCSSExtractPlugin.ts +0 -16
- package/webpack/plugin/moduleConcatenationPlugin.ts +0 -7
- package/webpack/plugin/webpackBundleAnalyzer.ts +0 -7
- package/webpack/plugin/webpackManifestPlugin.ts +0 -15
- package/webpack/server/devServer.ts +0 -13
- package/webpack/setup/commonSetup.ts +0 -36
- package/webpack/setup/developmentSetup.ts +0 -52
- package/webpack/setup/productionSetup.ts +0 -66
package/babel/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/babel/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare namespace env {
|
|
2
|
+
let amd: boolean;
|
|
3
|
+
let browser: boolean;
|
|
4
|
+
let commonjs: boolean;
|
|
5
|
+
let es2020: boolean;
|
|
6
|
+
let jasmine: boolean;
|
|
7
|
+
let jest: boolean;
|
|
8
|
+
let mocha: boolean;
|
|
9
|
+
let node: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare let _extends: string[];
|
|
12
|
+
export { _extends as extends };
|
|
13
|
+
export declare namespace globals {
|
|
14
|
+
export let document: boolean;
|
|
15
|
+
export let expect: boolean;
|
|
16
|
+
let jest_1: boolean;
|
|
17
|
+
export { jest_1 as jest };
|
|
18
|
+
export let jsdom: boolean;
|
|
19
|
+
export let renderMount: boolean;
|
|
20
|
+
export let renderShallow: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare let parser: string;
|
|
23
|
+
export declare namespace parserOptions {
|
|
24
|
+
namespace ecmaFeatures {
|
|
25
|
+
let jsx: boolean;
|
|
26
|
+
}
|
|
27
|
+
let ecmaVersion: number;
|
|
28
|
+
namespace projectService {
|
|
29
|
+
let allowDefaultProject: string[];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export declare let plugins: string[];
|
|
33
|
+
export declare let rules: {
|
|
34
|
+
'import/named': number;
|
|
35
|
+
'import/no-extraneous-dependencies': (number | {
|
|
36
|
+
devDependencies: string[];
|
|
37
|
+
})[];
|
|
38
|
+
'import/prefer-default-export': string;
|
|
39
|
+
'import/no-relative-packages': string;
|
|
40
|
+
'jsx-a11y/accessible-emoji': number;
|
|
41
|
+
'prettier/prettier': string;
|
|
42
|
+
'react-hooks/exhaustive-deps': string;
|
|
43
|
+
'react-hooks/rules-of-hooks': string;
|
|
44
|
+
'react/jsx-boolean-value': number;
|
|
45
|
+
'react/jsx-filename-extension': (number | {
|
|
46
|
+
extensions: string[];
|
|
47
|
+
})[];
|
|
48
|
+
'react/jsx-fragments': number;
|
|
49
|
+
'react/jsx-props-no-spreading': number;
|
|
50
|
+
'react/jsx-uses-react': string;
|
|
51
|
+
'react/react-in-jsx-scope': string;
|
|
52
|
+
semi: string[];
|
|
53
|
+
'import/extensions': (string | {
|
|
54
|
+
js: string;
|
|
55
|
+
jsx: string;
|
|
56
|
+
ts: string;
|
|
57
|
+
tsx: string;
|
|
58
|
+
})[];
|
|
59
|
+
'@typescript-eslint/no-empty-function': number;
|
|
60
|
+
'@typescript-eslint/strict-boolean-expressions': number;
|
|
61
|
+
'@typescript-eslint/prefer-nullish-coalescing': number;
|
|
62
|
+
'object-curly-spacing': number;
|
|
63
|
+
'comma-dangle': number;
|
|
64
|
+
'no-unused-vars': number;
|
|
65
|
+
};
|
|
66
|
+
export declare let settings: {
|
|
67
|
+
'import/resolver': {
|
|
68
|
+
alias: {
|
|
69
|
+
map: string[][];
|
|
70
|
+
extensions: string[];
|
|
71
|
+
};
|
|
72
|
+
node: {
|
|
73
|
+
extensions: string[];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
react: {
|
|
77
|
+
version: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.js"],"names":[],"mappings":""}
|
package/jest/config.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function getJestSetup({ testPathIgnorePatterns, coverageDirectory, collectCoverage, collectCoverageFrom, coverageThreshold }: {
|
|
2
|
+
testPathIgnorePatterns: any;
|
|
3
|
+
coverageDirectory: any;
|
|
4
|
+
collectCoverage: any;
|
|
5
|
+
collectCoverageFrom: any;
|
|
6
|
+
coverageThreshold: any;
|
|
7
|
+
}): {
|
|
8
|
+
testMatch: string[];
|
|
9
|
+
testPathIgnorePatterns: any;
|
|
10
|
+
roots: string[];
|
|
11
|
+
transform: {
|
|
12
|
+
'^.+\\.(js|jsx|ts|tsx)$': string;
|
|
13
|
+
};
|
|
14
|
+
coverageDirectory: any;
|
|
15
|
+
collectCoverage: any;
|
|
16
|
+
coverageReporters: string[];
|
|
17
|
+
collectCoverageFrom: any;
|
|
18
|
+
setupFilesAfterEnv: string[];
|
|
19
|
+
moduleNameMapper: {
|
|
20
|
+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|md)$': string;
|
|
21
|
+
'^.+\\.(css|less|scss|md)$': string;
|
|
22
|
+
};
|
|
23
|
+
transformIgnorePatterns: string[];
|
|
24
|
+
moduleFileExtensions: string[];
|
|
25
|
+
coverageThreshold: any;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;EAoBC"}
|
package/jest/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jest/index.js"],"names":[],"mappings":""}
|
package/jest/setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/jest/setup.js"],"names":[],"mappings":"AAIA,qCAIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/setup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Papillon Arts Setup",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/setup",
|
|
6
6
|
"repository": {
|
|
@@ -24,10 +24,12 @@
|
|
|
24
24
|
"clean-up": "rm -rf build node_modules package-lock.json",
|
|
25
25
|
"install-packages": "npm i",
|
|
26
26
|
"install-papillonarts-latest": "echo \"setup skipping install-papillonarts-latest\" && exit 0",
|
|
27
|
-
"
|
|
27
|
+
"generate-typing": "tsc",
|
|
28
|
+
"generate-commonjs": "rm -rf build && babel --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx' --out-dir build src --ignore **/__tests__",
|
|
29
|
+
"build": "npm-run-all generate-commonjs generate-typing",
|
|
28
30
|
"build-test": "npm run build",
|
|
29
31
|
"build-acceptance": "npm run build",
|
|
30
32
|
"build-release": "npm run build"
|
|
31
33
|
},
|
|
32
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "a3d3650b3ada16291938971ccb30fa08dfb71b33"
|
|
33
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prettier/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storybook/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "getStorybookMainSetup", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _mainSetup.getStorybookMainSetup;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "getStorybookPreviewSetup", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _previewSetup.getStorybookPreviewSetup;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "setStorybookManagerSetup", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _managerSetup.setStorybookManagerSetup;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _mainSetup = require("./mainSetup");
|
|
25
|
+
var _managerSetup = require("./managerSetup");
|
|
26
|
+
var _previewSetup = require("./previewSetup");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
2
|
+
export declare function getStorybookMainSetup({ storiesBasePath, includeBasePath, modulesBasePath, rootAttributesDefaults }: {
|
|
3
|
+
storiesBasePath: any;
|
|
4
|
+
includeBasePath: any;
|
|
5
|
+
modulesBasePath: any;
|
|
6
|
+
rootAttributesDefaults: any;
|
|
7
|
+
}): StorybookConfig;
|
|
8
|
+
//# sourceMappingURL=mainSetup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mainSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/mainSetup.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAIhE,wBAAgB,qBAAqB,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE;;;;;CAAA,GAAG,eAAe,CA2QpI"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getStorybookMainSetup = getStorybookMainSetup;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _webpack = _interopRequireDefault(require("webpack"));
|
|
12
|
+
var _object = require("@papillonarts/library/object");
|
|
13
|
+
var _webpack2 = require("@papillonarts/setup/webpack");
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* https://storybook.js.org/docs/configure/integration/typescript */ /* eslint-disable no-unused-vars */ /* eslint-disable no-param-reassign */ /* eslint-disable global-require */
|
|
16
|
+
function getStorybookMainSetup(_ref) {
|
|
17
|
+
var storiesBasePath = _ref.storiesBasePath,
|
|
18
|
+
includeBasePath = _ref.includeBasePath,
|
|
19
|
+
modulesBasePath = _ref.modulesBasePath,
|
|
20
|
+
rootAttributesDefaults = _ref.rootAttributesDefaults;
|
|
21
|
+
// https://storybook.js.org/docs/react/api/main-config
|
|
22
|
+
return {
|
|
23
|
+
// https://storybook.js.org/docs/api/main-config/main-config-preview-body
|
|
24
|
+
previewBody: function previewBody(body) {
|
|
25
|
+
if (rootAttributesDefaults) {
|
|
26
|
+
// https://github.com/storybookjs/storybook/issues/24429
|
|
27
|
+
return "\n ".concat(body, "\n <script type=\"text/javascript\">\n (() => {\n document.addEventListener('DOMContentLoaded', function() {\n const storybookRootElement = document.getElementById(\"storybook-root\")\n\n // https://primer.style/foundations/primitives/getting-started\n storybookRootElement.setAttribute(\"data-color-mode\", \"light\")\n storybookRootElement.setAttribute(\"data-light-theme\", \"light\")\n storybookRootElement.setAttribute(\"data-dark-theme\", \"dark\")\n });\n })()\n </script>\n ");
|
|
28
|
+
}
|
|
29
|
+
return "".concat(body);
|
|
30
|
+
},
|
|
31
|
+
// https://storybook.js.org/docs/react/configure/frameworks
|
|
32
|
+
framework: {
|
|
33
|
+
name: '@storybook/react-webpack5',
|
|
34
|
+
options: {
|
|
35
|
+
fastRefresh: false,
|
|
36
|
+
strictMode: false,
|
|
37
|
+
legacyRootApi: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
// https://storybook.js.org/docs/react/api/main-config-stories
|
|
41
|
+
stories: [storiesBasePath],
|
|
42
|
+
// https://storybook.js.org/docs/react/api/main-config-addons
|
|
43
|
+
// https://storybook.js.org/docs/react/addons/introduction
|
|
44
|
+
// https://storybook.js.org/integrations
|
|
45
|
+
addons: [
|
|
46
|
+
// https://storybook.js.org/addons/@storybook/addon-a11y
|
|
47
|
+
'@storybook/addon-a11y',
|
|
48
|
+
// included by default in @storybook/addon-essentials
|
|
49
|
+
// https://storybook.js.org/docs/react/essentials/actions
|
|
50
|
+
// https://storybook.js.org/addons/@storybook/addon-actions
|
|
51
|
+
// '@storybook/addon-actions',
|
|
52
|
+
|
|
53
|
+
// included by default in @storybook/addon-essentials
|
|
54
|
+
// https://storybook.js.org/docs/react/essentials/backgrounds
|
|
55
|
+
// https://storybook.js.org/addons/@storybook/addon-backgrounds
|
|
56
|
+
// '@storybook/addon-backgrounds',
|
|
57
|
+
|
|
58
|
+
// https://storybook.js.org/addons/chromatic
|
|
59
|
+
// chromatic
|
|
60
|
+
|
|
61
|
+
// included by default in @storybook/addon-essentials
|
|
62
|
+
// https://storybook.js.org/docs/react/essentials/controls
|
|
63
|
+
// https://storybook.js.org/addons/@storybook/addon-controls
|
|
64
|
+
// '@storybook/addon-controls',
|
|
65
|
+
|
|
66
|
+
// https://storybook.js.org/addons/storybook-addon-designs
|
|
67
|
+
// storybook-addon-designs
|
|
68
|
+
|
|
69
|
+
// included by default in @storybook/addon-essentials
|
|
70
|
+
// https://storybook.js.org/docs/react/essentials/docs (404)
|
|
71
|
+
// https://storybook.js.org/addons/@storybook/addon-docs
|
|
72
|
+
// {
|
|
73
|
+
// name: '@storybook/addon-docs',
|
|
74
|
+
// options: {
|
|
75
|
+
// jsxOptions: {},
|
|
76
|
+
// csfPluginOptions: null,
|
|
77
|
+
// mdxPluginOptions: {},
|
|
78
|
+
// transcludeMarkdown: true,
|
|
79
|
+
// },
|
|
80
|
+
// },
|
|
81
|
+
|
|
82
|
+
// https://storybook.js.org/docs/react/essentials/introduction
|
|
83
|
+
// https://storybook.js.org/integrations/tag/essentials
|
|
84
|
+
// '@storybook/addon-essentials',
|
|
85
|
+
|
|
86
|
+
// included by default in @storybook/addon-essentials
|
|
87
|
+
// https://storybook.js.org/docs/react/essentials/highlight (404)
|
|
88
|
+
// https://storybook.js.org/addons/@storybook/addon-highlight
|
|
89
|
+
// '@storybook/addon-highlight',
|
|
90
|
+
|
|
91
|
+
// https://storybook.js.org/addons/@storybook/addon-interactions
|
|
92
|
+
// '@storybook/addon-interactions',
|
|
93
|
+
|
|
94
|
+
// https://storybook.js.org/addons/@storybook/addon-jest
|
|
95
|
+
'@storybook/addon-jest',
|
|
96
|
+
// https://storybook.js.org/addons/@storybook/addon-links
|
|
97
|
+
'@storybook/addon-links',
|
|
98
|
+
// https://storybook.js.org/addons/msw-storybook-addon
|
|
99
|
+
// msw-storybook-addon
|
|
100
|
+
|
|
101
|
+
// included by default in @storybook/addon-essentials
|
|
102
|
+
// https://storybook.js.org/docs/react/essentials/measure-and-outline
|
|
103
|
+
// https://storybook.js.org/addons/@storybook/addon-measure
|
|
104
|
+
// https://storybook.js.org/addons/@storybook/addon-outline
|
|
105
|
+
// '@storybook/addon-measure',
|
|
106
|
+
// '@storybook/addon-outline',
|
|
107
|
+
|
|
108
|
+
// included by default in @storybook/addon-essentials
|
|
109
|
+
// https://storybook.js.org/docs/react/essentials/toolbars-and-globals
|
|
110
|
+
// https://storybook.js.org/addons/@storybook/addon-toolbars
|
|
111
|
+
// '@storybook/addon-toolbars',
|
|
112
|
+
|
|
113
|
+
// included by default in @storybook/addon-essentials
|
|
114
|
+
// https://storybook.js.org/docs/react/essentials/viewport
|
|
115
|
+
// https://storybook.js.org/addons/@storybook/addon-viewport
|
|
116
|
+
// '@storybook/addon-viewport',
|
|
117
|
+
|
|
118
|
+
'@chromatic-com/storybook',
|
|
119
|
+
// https://storybook.js.org/addons/@storybook/addon-styling-webpack
|
|
120
|
+
'@storybook/addon-styling-webpack',
|
|
121
|
+
// https://storybook.js.org/addons/@storybook/addon-themes
|
|
122
|
+
'@storybook/addon-themes', '@storybook/addon-webpack5-compiler-babel'],
|
|
123
|
+
// https://storybook.js.org/docs/react/api/main-config-babel
|
|
124
|
+
// ...
|
|
125
|
+
|
|
126
|
+
// https://storybook.js.org/docs/react/api/main-config-babel-default
|
|
127
|
+
// ...
|
|
128
|
+
|
|
129
|
+
// https://storybook.js.org/docs/react/api/main-config-core
|
|
130
|
+
// https://storybook.js.org/docs/api/main-config/main-config-core#builder
|
|
131
|
+
core: {
|
|
132
|
+
builder: {
|
|
133
|
+
name: '@storybook/builder-webpack5',
|
|
134
|
+
options: null
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
// https://storybook.js.org/docs/react/api/main-config-docs
|
|
138
|
+
// https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
139
|
+
// https://storybook.js.org/docs/react/writing-docs/mdx
|
|
140
|
+
// https://storybook.js.org/docs/writing-docs/autodocs
|
|
141
|
+
docs: {
|
|
142
|
+
defaultName: 'Documentation',
|
|
143
|
+
docsMode: false
|
|
144
|
+
},
|
|
145
|
+
// https://storybook.js.org/docs/react/api/main-config-env
|
|
146
|
+
// ...
|
|
147
|
+
|
|
148
|
+
// https://storybook.js.org/docs/react/api/main-config-features
|
|
149
|
+
// ...
|
|
150
|
+
|
|
151
|
+
// https://storybook.js.org/docs/react/api/main-config-log-level
|
|
152
|
+
logLevel: 'debug',
|
|
153
|
+
// https://storybook.js.org/docs/react/api/main-config-manager-head
|
|
154
|
+
// ...
|
|
155
|
+
|
|
156
|
+
// https://storybook.js.org/docs/react/api/main-config-preview-annotations
|
|
157
|
+
// ...
|
|
158
|
+
|
|
159
|
+
// https://storybook.js.org/docs/react/api/main-config-preview-body
|
|
160
|
+
// ...
|
|
161
|
+
|
|
162
|
+
// https://storybook.js.org/docs/react/api/main-config-preview-head
|
|
163
|
+
// ...
|
|
164
|
+
|
|
165
|
+
// https://storybook.js.org/docs/react/api/main-config-refs
|
|
166
|
+
// ...
|
|
167
|
+
|
|
168
|
+
// https://storybook.js.org/docs/react/api/main-config-static-dirs
|
|
169
|
+
// ...
|
|
170
|
+
|
|
171
|
+
// https://storybook.js.org/docs/react/api/main-config-typescript
|
|
172
|
+
// ...
|
|
173
|
+
|
|
174
|
+
// https://storybook.js.org/docs/react/api/main-config-webpack-final
|
|
175
|
+
webpackFinal: function () {
|
|
176
|
+
var _webpackFinal = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(config, _ref2) {
|
|
177
|
+
var configType, fileLoaderRuleSVG;
|
|
178
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
179
|
+
while (1) switch (_context.prev = _context.next) {
|
|
180
|
+
case 0:
|
|
181
|
+
configType = _ref2.configType;
|
|
182
|
+
// @ts-ignore
|
|
183
|
+
fileLoaderRuleSVG = config.module.rules.find(function (rule) {
|
|
184
|
+
var _rule$test$test, _rule$test;
|
|
185
|
+
return !(0, _object.isEmptyObject)(rule) && ((_rule$test$test = (_rule$test = rule.test).test) === null || _rule$test$test === void 0 ? void 0 : _rule$test$test.call(_rule$test, '.svg'));
|
|
186
|
+
}); // @ts-ignore
|
|
187
|
+
fileLoaderRuleSVG.exclude = /\.svg$/;
|
|
188
|
+
config.module.rules = config.module.rules.concat([{
|
|
189
|
+
test: /\.(css|scss)$/,
|
|
190
|
+
use: [{
|
|
191
|
+
loader: 'style-loader'
|
|
192
|
+
}, {
|
|
193
|
+
loader: 'css-loader',
|
|
194
|
+
options: {
|
|
195
|
+
importLoaders: 2,
|
|
196
|
+
sourceMap: true,
|
|
197
|
+
modules: {
|
|
198
|
+
localIdentName: '[name]__[local]___[hash:base64:5]',
|
|
199
|
+
/* https://webpack.js.org/loaders/css-loader/#exportlocalsconvention */
|
|
200
|
+
exportLocalsConvention: 'as-is'
|
|
201
|
+
},
|
|
202
|
+
/* https://stackoverflow.com/questions/78589664/style-loader-does-not-recoginize-default-imports-of-css-modules-in-storybooks */
|
|
203
|
+
esModule: false
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
loader: 'postcss-loader',
|
|
207
|
+
options: {
|
|
208
|
+
postcssOptions: {
|
|
209
|
+
sourceMap: true,
|
|
210
|
+
plugins: function plugins() {
|
|
211
|
+
return [require('postcss-preset-env')()];
|
|
212
|
+
},
|
|
213
|
+
parser: 'postcss-scss'
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
loader: 'sass-loader',
|
|
218
|
+
options: {
|
|
219
|
+
sassOptions: {
|
|
220
|
+
includePaths: [modulesBasePath],
|
|
221
|
+
// https://sass-lang.com/documentation/js-api/interfaces/options/#quietDeps
|
|
222
|
+
// https://sass-lang.com/documentation/js-api/interfaces/options/#silenceDeprecations
|
|
223
|
+
// https://sass-lang.com/documentation/js-api/interfaces/deprecations/
|
|
224
|
+
quietDeps: true,
|
|
225
|
+
silenceDeprecations: ['import', 'global-builtin']
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}]
|
|
229
|
+
}, {
|
|
230
|
+
test: /\.svg$/i,
|
|
231
|
+
issuer: /\.[jt]sx?$/,
|
|
232
|
+
use: ['@svgr/webpack']
|
|
233
|
+
}, {
|
|
234
|
+
test: /\.int.story\.mdx$/,
|
|
235
|
+
use: [{
|
|
236
|
+
loader: 'babel-loader',
|
|
237
|
+
options: {
|
|
238
|
+
plugins: ['@babel/plugin-transform-react-jsx']
|
|
239
|
+
}
|
|
240
|
+
}, {
|
|
241
|
+
loader: '@mdx-js/loader',
|
|
242
|
+
options: {}
|
|
243
|
+
}]
|
|
244
|
+
}, (0, _webpack2.getBabelLoaderAdvancedSetup)()]);
|
|
245
|
+
config.plugins.push(new _webpack["default"].ProvidePlugin({
|
|
246
|
+
process: 'process/browser'
|
|
247
|
+
}));
|
|
248
|
+
config.resolve.fallback = _objectSpread(_objectSpread({}, config.resolve.fallback), {}, {
|
|
249
|
+
tty: require.resolve('tty-browserify')
|
|
250
|
+
});
|
|
251
|
+
return _context.abrupt("return", config);
|
|
252
|
+
case 1:
|
|
253
|
+
case "end":
|
|
254
|
+
return _context.stop();
|
|
255
|
+
}
|
|
256
|
+
}, _callee);
|
|
257
|
+
}));
|
|
258
|
+
function webpackFinal(_x, _x2) {
|
|
259
|
+
return _webpackFinal.apply(this, arguments);
|
|
260
|
+
}
|
|
261
|
+
return webpackFinal;
|
|
262
|
+
}(),
|
|
263
|
+
typescript: {
|
|
264
|
+
reactDocgen: 'react-docgen-typescript',
|
|
265
|
+
check: true
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managerSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/managerSetup.ts"],"names":[],"mappings":"AAGA,wBAAgB,wBAAwB,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE;;;CAAA,QAKhE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setStorybookManagerSetup = setStorybookManagerSetup;
|
|
7
|
+
var _managerApi = require("storybook/manager-api");
|
|
8
|
+
var _theming = require("storybook/theming");
|
|
9
|
+
function setStorybookManagerSetup(_ref) {
|
|
10
|
+
var panelPosition = _ref.panelPosition,
|
|
11
|
+
theme = _ref.theme;
|
|
12
|
+
_managerApi.addons.setConfig({
|
|
13
|
+
panelPosition: panelPosition,
|
|
14
|
+
theme: (0, _theming.create)(theme)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previewSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/previewSetup.tsx"],"names":[],"mappings":"AAGA,wBAAgB,wBAAwB,CAAC,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE;;;;;;CAAA;;EA8ClF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getStorybookPreviewSetup = getStorybookPreviewSetup;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _reactRouterDom = require("react-router-dom");
|
|
10
|
+
var _blocks = require("@storybook/addon-docs/blocks");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function getStorybookPreviewSetup(_ref) {
|
|
15
|
+
var _ref$parameters = _ref.parameters,
|
|
16
|
+
a11y = _ref$parameters.a11y,
|
|
17
|
+
decorators = _ref$parameters.decorators,
|
|
18
|
+
docs = _ref$parameters.docs;
|
|
19
|
+
var parameters = {};
|
|
20
|
+
if (a11y) {
|
|
21
|
+
parameters = _objectSpread(_objectSpread({}, parameters), {}, {
|
|
22
|
+
a11y: _objectSpread({}, {
|
|
23
|
+
// optional selector which element to inspect
|
|
24
|
+
// element: '#root',
|
|
25
|
+
// axe-core configurationOptions (https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#parameters-1)
|
|
26
|
+
config: {},
|
|
27
|
+
// axe-core optionsParameter (https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter)
|
|
28
|
+
options: {}
|
|
29
|
+
// optional flag to prevent the automatic check
|
|
30
|
+
// manual: true,
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (decorators) {
|
|
35
|
+
parameters = _objectSpread(_objectSpread({}, parameters), {}, {
|
|
36
|
+
decorators: [function (Story) {
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Story, {})
|
|
39
|
+
});
|
|
40
|
+
}].concat()
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (docs) {
|
|
44
|
+
parameters = _objectSpread(_objectSpread({}, parameters), {}, {
|
|
45
|
+
docs: _objectSpread({}, {
|
|
46
|
+
container: _blocks.DocsContainer,
|
|
47
|
+
page: _blocks.DocsPage
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
parameters: parameters
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare let _extends: string[];
|
|
2
|
+
export { _extends as extends };
|
|
3
|
+
export declare let plugins: string[];
|
|
4
|
+
export declare let rules: {
|
|
5
|
+
'alpha-value-notation': any;
|
|
6
|
+
'at-rule-no-unknown': any;
|
|
7
|
+
'color-function-notation': any;
|
|
8
|
+
'declaration-empty-line-before': any;
|
|
9
|
+
'keyframes-name-pattern': any;
|
|
10
|
+
'prettier/prettier': boolean;
|
|
11
|
+
'rule-empty-line-before': any;
|
|
12
|
+
'selector-class-pattern': any;
|
|
13
|
+
'annotation-no-unknown': any;
|
|
14
|
+
'import-notation': string;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stylelint/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const coreJSVersion = "3.46.0";
|
|
2
|
+
export declare const targetBrowsers: {
|
|
3
|
+
production: string[];
|
|
4
|
+
legacyBrowsers: string[];
|
|
5
|
+
modernBrowsers: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const manifestFileName = "manifest.json";
|
|
8
|
+
export declare const indexHTMLName = "index.html";
|
|
9
|
+
export declare const extensions: string[];
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webpack/constant/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,WAAW,CAAA;AAErC,eAAO,MAAM,cAAc;;;;CAe1B,CAAA;AAED,eAAO,MAAM,gBAAgB,kBAAkB,CAAA;AAE/C,eAAO,MAAM,aAAa,eAAe,CAAA;AAEzC,eAAO,MAAM,UAAU,UAAoC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.targetBrowsers = exports.manifestFileName = exports.indexHTMLName = exports.extensions = exports.coreJSVersion = void 0;
|
|
7
|
+
var coreJSVersion = exports.coreJSVersion = '3.46.0';
|
|
8
|
+
var targetBrowsers = exports.targetBrowsers = {
|
|
9
|
+
production: ['> 1%', 'last 2 versions', 'Firefox ESR'],
|
|
10
|
+
legacyBrowsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
|
|
11
|
+
modernBrowsers: ['last 2 Chrome versions', 'not Chrome < 60', 'last 2 Safari versions', 'not Safari < 10.1', 'last 2 iOS versions', 'not iOS < 10.3', 'last 2 Firefox versions', 'not Firefox < 54', 'last 2 Edge versions', 'not Edge < 15']
|
|
12
|
+
};
|
|
13
|
+
var manifestFileName = exports.manifestFileName = 'manifest.json';
|
|
14
|
+
var indexHTMLName = exports.indexHTMLName = 'index.html';
|
|
15
|
+
var extensions = exports.extensions = ['.js', '.jsx', '.json', '.scss'];
|