@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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCleanWebpackPluginAdvancedSetup = getCleanWebpackPluginAdvancedSetup;
|
|
7
|
+
exports.getCleanWebpackPluginStandardSetup = getCleanWebpackPluginStandardSetup;
|
|
8
|
+
var _cleanWebpackPlugin = require("clean-webpack-plugin");
|
|
9
|
+
// https://github.com/johnagan/clean-webpack-plugin
|
|
10
|
+
|
|
11
|
+
function getCleanWebpackPluginStandardSetup() {
|
|
12
|
+
return new _cleanWebpackPlugin.CleanWebpackPlugin();
|
|
13
|
+
}
|
|
14
|
+
function getCleanWebpackPluginAdvancedSetup(_ref) {
|
|
15
|
+
var dry = _ref.dry,
|
|
16
|
+
verbose = _ref.verbose,
|
|
17
|
+
cleanStaleWebpackAssets = _ref.cleanStaleWebpackAssets,
|
|
18
|
+
protectWebpackAssets = _ref.protectWebpackAssets,
|
|
19
|
+
cleanOnceBeforeBuildPatterns = _ref.cleanOnceBeforeBuildPatterns,
|
|
20
|
+
cleanAfterEveryBuildPatterns = _ref.cleanAfterEveryBuildPatterns,
|
|
21
|
+
dangerouslyAllowCleanPatternsOutsideProject = _ref.dangerouslyAllowCleanPatternsOutsideProject;
|
|
22
|
+
return new _cleanWebpackPlugin.CleanWebpackPlugin({
|
|
23
|
+
dry: dry,
|
|
24
|
+
verbose: verbose,
|
|
25
|
+
cleanStaleWebpackAssets: cleanStaleWebpackAssets,
|
|
26
|
+
protectWebpackAssets: protectWebpackAssets,
|
|
27
|
+
cleanOnceBeforeBuildPatterns: cleanOnceBeforeBuildPatterns,
|
|
28
|
+
cleanAfterEveryBuildPatterns: cleanAfterEveryBuildPatterns,
|
|
29
|
+
dangerouslyAllowCleanPatternsOutsideProject: dangerouslyAllowCleanPatternsOutsideProject
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyWebpackPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/copyWebpackPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AAEnD,wBAAgB,iCAAiC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;;;CAAA,qBAa7D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getCopyWebpackPluginStandardSetup = getCopyWebpackPluginStandardSetup;
|
|
8
|
+
var _copyWebpackPlugin = _interopRequireDefault(require("copy-webpack-plugin"));
|
|
9
|
+
// https://github.com/webpack-contrib/copy-webpack-plugin
|
|
10
|
+
|
|
11
|
+
function getCopyWebpackPluginStandardSetup(_ref) {
|
|
12
|
+
var from = _ref.from,
|
|
13
|
+
to = _ref.to;
|
|
14
|
+
return new _copyWebpackPlugin["default"]({
|
|
15
|
+
patterns: [{
|
|
16
|
+
from: from,
|
|
17
|
+
to: to,
|
|
18
|
+
globOptions: {
|
|
19
|
+
ignore: ['*.DS_Store']
|
|
20
|
+
},
|
|
21
|
+
noErrorOnMissing: true
|
|
22
|
+
}]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssMinimizerWebpackPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/cssMinimizerWebpackPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB,MAAM,8BAA8B,CAAA;AAEpE,wBAAgB,yCAAyC,gFAExD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getCSSMinimizerWebpackPluginStandardSetup = getCSSMinimizerWebpackPluginStandardSetup;
|
|
8
|
+
var _cssMinimizerWebpackPlugin = _interopRequireDefault(require("css-minimizer-webpack-plugin"));
|
|
9
|
+
// https://github.com/webpack-contrib/css-minimizer-webpack-plugin
|
|
10
|
+
|
|
11
|
+
function getCSSMinimizerWebpackPluginStandardSetup() {
|
|
12
|
+
return new _cssMinimizerWebpackPlugin["default"]();
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function getDotenvWebpackStandardSetup({ path }: {
|
|
2
|
+
path: any;
|
|
3
|
+
}): any;
|
|
4
|
+
export declare function getDotenvWebpackAdvancedSetup({ path, safe, allowEmptyValues, systemvars, silent, defaults, prefix }: {
|
|
5
|
+
path: any;
|
|
6
|
+
safe: any;
|
|
7
|
+
allowEmptyValues: any;
|
|
8
|
+
systemvars: any;
|
|
9
|
+
silent: any;
|
|
10
|
+
defaults: any;
|
|
11
|
+
prefix: any;
|
|
12
|
+
}): any;
|
|
13
|
+
//# sourceMappingURL=dotenvWebpack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dotenvWebpack.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/dotenvWebpack.ts"],"names":[],"mappings":"AAIA,wBAAgB,6BAA6B,CAAC,EAAE,IAAI,EAAE;;CAAA,OAErD;AAED,wBAAgB,6BAA6B,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;;;;;;;;CAAA,OAUnH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getDotenvWebpackAdvancedSetup = getDotenvWebpackAdvancedSetup;
|
|
8
|
+
exports.getDotenvWebpackStandardSetup = getDotenvWebpackStandardSetup;
|
|
9
|
+
var _dotenvWebpack = _interopRequireDefault(require("dotenv-webpack"));
|
|
10
|
+
// https://github.com/mrsteele/dotenv-webpack
|
|
11
|
+
|
|
12
|
+
function getDotenvWebpackStandardSetup(_ref) {
|
|
13
|
+
var path = _ref.path;
|
|
14
|
+
return new _dotenvWebpack["default"]({
|
|
15
|
+
path: path
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function getDotenvWebpackAdvancedSetup(_ref2) {
|
|
19
|
+
var path = _ref2.path,
|
|
20
|
+
safe = _ref2.safe,
|
|
21
|
+
allowEmptyValues = _ref2.allowEmptyValues,
|
|
22
|
+
systemvars = _ref2.systemvars,
|
|
23
|
+
silent = _ref2.silent,
|
|
24
|
+
defaults = _ref2.defaults,
|
|
25
|
+
prefix = _ref2.prefix;
|
|
26
|
+
return new _dotenvWebpack["default"]({
|
|
27
|
+
path: path,
|
|
28
|
+
safe: safe,
|
|
29
|
+
allowEmptyValues: allowEmptyValues,
|
|
30
|
+
systemvars: systemvars,
|
|
31
|
+
silent: silent,
|
|
32
|
+
defaults: defaults,
|
|
33
|
+
prefix: prefix
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hotModuleReplacementPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/hotModuleReplacementPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,wBAAgB,0CAA0C,uCAEzD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getHotModuleReplacementPluginStandardSetup = getHotModuleReplacementPluginStandardSetup;
|
|
8
|
+
var _webpack = _interopRequireDefault(require("webpack"));
|
|
9
|
+
// https://webpack.js.org/plugins/hot-module-replacement-plugin/
|
|
10
|
+
|
|
11
|
+
function getHotModuleReplacementPluginStandardSetup() {
|
|
12
|
+
return new _webpack["default"].HotModuleReplacementPlugin();
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
2
|
+
export declare function getHtmlWebpackPluginStandardSetup({ title, micrositeWebpackFolderPath }: {
|
|
3
|
+
title: any;
|
|
4
|
+
micrositeWebpackFolderPath: any;
|
|
5
|
+
}): HtmlWebpackPlugin;
|
|
6
|
+
export declare function getHtmlWebpackPluginAdvancedSetup({ title, meta, template, filename, inject, scriptLoading }: {
|
|
7
|
+
title: any;
|
|
8
|
+
meta: any;
|
|
9
|
+
template: any;
|
|
10
|
+
filename: any;
|
|
11
|
+
inject: any;
|
|
12
|
+
scriptLoading: any;
|
|
13
|
+
}): HtmlWebpackPlugin;
|
|
14
|
+
//# sourceMappingURL=htmlWebpackPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlWebpackPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/htmlWebpackPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AAGnD,wBAAgB,iCAAiC,CAAC,EAAE,KAAK,EAAE,0BAA0B,EAAE;;;CAAA,qBAStF;AACD,wBAAgB,iCAAiC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE;;;;;;;CAAA,qBAS3G"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getHtmlWebpackPluginAdvancedSetup = getHtmlWebpackPluginAdvancedSetup;
|
|
8
|
+
exports.getHtmlWebpackPluginStandardSetup = getHtmlWebpackPluginStandardSetup;
|
|
9
|
+
var _htmlWebpackPlugin = _interopRequireDefault(require("html-webpack-plugin"));
|
|
10
|
+
var _constant = require("../constant");
|
|
11
|
+
// https://github.com/jantimon/html-webpack-plugin
|
|
12
|
+
|
|
13
|
+
function getHtmlWebpackPluginStandardSetup(_ref) {
|
|
14
|
+
var title = _ref.title,
|
|
15
|
+
micrositeWebpackFolderPath = _ref.micrositeWebpackFolderPath;
|
|
16
|
+
return new _htmlWebpackPlugin["default"]({
|
|
17
|
+
title: title,
|
|
18
|
+
meta: {
|
|
19
|
+
viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'
|
|
20
|
+
},
|
|
21
|
+
template: "".concat(micrositeWebpackFolderPath, "/").concat(_constant.indexHTMLName),
|
|
22
|
+
filename: _constant.indexHTMLName,
|
|
23
|
+
inject: 'body',
|
|
24
|
+
scriptLoading: 'defer'
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function getHtmlWebpackPluginAdvancedSetup(_ref2) {
|
|
28
|
+
var title = _ref2.title,
|
|
29
|
+
meta = _ref2.meta,
|
|
30
|
+
template = _ref2.template,
|
|
31
|
+
filename = _ref2.filename,
|
|
32
|
+
inject = _ref2.inject,
|
|
33
|
+
scriptLoading = _ref2.scriptLoading;
|
|
34
|
+
return new _htmlWebpackPlugin["default"]({
|
|
35
|
+
title: title,
|
|
36
|
+
meta: meta,
|
|
37
|
+
template: template,
|
|
38
|
+
filename: filename,
|
|
39
|
+
inject: inject,
|
|
40
|
+
scriptLoading: scriptLoading
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
2
|
+
export declare const MiniCSSExtractPluginLoader: string;
|
|
3
|
+
export declare function getMiniCSSExtractPluginStandardSetup(): MiniCssExtractPlugin;
|
|
4
|
+
export declare function getMiniCSSExtractPluginAdvancedSetup(): MiniCssExtractPlugin;
|
|
5
|
+
//# sourceMappingURL=miniCSSExtractPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"miniCSSExtractPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/miniCSSExtractPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,MAAM,yBAAyB,CAAA;AAE1D,eAAO,MAAM,0BAA0B,QAA8B,CAAA;AAErE,wBAAgB,oCAAoC,yBAEnD;AAED,wBAAgB,oCAAoC,yBAKnD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.MiniCSSExtractPluginLoader = void 0;
|
|
8
|
+
exports.getMiniCSSExtractPluginAdvancedSetup = getMiniCSSExtractPluginAdvancedSetup;
|
|
9
|
+
exports.getMiniCSSExtractPluginStandardSetup = getMiniCSSExtractPluginStandardSetup;
|
|
10
|
+
var _miniCssExtractPlugin = _interopRequireDefault(require("mini-css-extract-plugin"));
|
|
11
|
+
// https://github.com/webpack-contrib/mini-css-extract-plugin
|
|
12
|
+
|
|
13
|
+
var MiniCSSExtractPluginLoader = exports.MiniCSSExtractPluginLoader = _miniCssExtractPlugin["default"].loader;
|
|
14
|
+
function getMiniCSSExtractPluginStandardSetup() {
|
|
15
|
+
return new _miniCssExtractPlugin["default"]();
|
|
16
|
+
}
|
|
17
|
+
function getMiniCSSExtractPluginAdvancedSetup() {
|
|
18
|
+
return new _miniCssExtractPlugin["default"]({
|
|
19
|
+
filename: 'styles/[name].[contenthash].css',
|
|
20
|
+
chunkFilename: '[id].css'
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleConcatenationPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/moduleConcatenationPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,wBAAgB,yCAAyC;;EAExD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getModuleConcatenationPluginStandardSetup = getModuleConcatenationPluginStandardSetup;
|
|
8
|
+
var _webpack = _interopRequireDefault(require("webpack"));
|
|
9
|
+
// https://webpack.js.org/plugins/module-concatenation-plugin/
|
|
10
|
+
|
|
11
|
+
function getModuleConcatenationPluginStandardSetup() {
|
|
12
|
+
return new _webpack["default"].optimize.ModuleConcatenationPlugin();
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpackBundleAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/webpackBundleAnalyzer.ts"],"names":[],"mappings":"AAIA,wBAAgB,qCAAqC,QAEpD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackBundleAnalyzerStandardSetup = getWebpackBundleAnalyzerStandardSetup;
|
|
7
|
+
var _webpackBundleAnalyzer = require("webpack-bundle-analyzer");
|
|
8
|
+
// https://github.com/webpack-contrib/webpack-bundle-analyzer
|
|
9
|
+
|
|
10
|
+
function getWebpackBundleAnalyzerStandardSetup() {
|
|
11
|
+
return new _webpackBundleAnalyzer.BundleAnalyzerPlugin({
|
|
12
|
+
analyzerMode: 'static',
|
|
13
|
+
openAnalyzer: false
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpackManifestPlugin.d.ts","sourceRoot":"","sources":["../../../src/webpack/plugin/webpackManifestPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAG/D,wBAAgB,qCAAqC,0BASpD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackManifestPluginStandardSetup = getWebpackManifestPluginStandardSetup;
|
|
7
|
+
var _webpackManifestPlugin = require("webpack-manifest-plugin");
|
|
8
|
+
var _constant = require("../constant");
|
|
9
|
+
// https://github.com/shellscape/webpack-manifest-plugin
|
|
10
|
+
/* eslint-disable no-param-reassign */
|
|
11
|
+
|
|
12
|
+
function getWebpackManifestPluginStandardSetup() {
|
|
13
|
+
return new _webpackManifestPlugin.WebpackManifestPlugin({
|
|
14
|
+
fileName: _constant.manifestFileName,
|
|
15
|
+
basePath: '',
|
|
16
|
+
map: function map(file) {
|
|
17
|
+
file.name = file.name.replace(/(\.[a-f0-9]{32})(\..*)$/, '$2');
|
|
18
|
+
return file;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function getDevServerStandardSetup(): {
|
|
2
|
+
historyApiFallback: boolean;
|
|
3
|
+
open: boolean;
|
|
4
|
+
compress: boolean;
|
|
5
|
+
hot: boolean;
|
|
6
|
+
port: number;
|
|
7
|
+
host: string;
|
|
8
|
+
headers: {
|
|
9
|
+
'Access-Control-Allow-Origin': string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=devServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devServer.d.ts","sourceRoot":"","sources":["../../../src/webpack/server/devServer.ts"],"names":[],"mappings":"AAEA,wBAAgB,yBAAyB;;;;;;;;;;EAUxC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDevServerStandardSetup = getDevServerStandardSetup;
|
|
7
|
+
// https://webpack.js.org/configuration/dev-server/
|
|
8
|
+
|
|
9
|
+
function getDevServerStandardSetup() {
|
|
10
|
+
return {
|
|
11
|
+
historyApiFallback: true,
|
|
12
|
+
open: true,
|
|
13
|
+
compress: true,
|
|
14
|
+
hot: true,
|
|
15
|
+
port: 8080,
|
|
16
|
+
host: 'localhost',
|
|
17
|
+
headers: {
|
|
18
|
+
'Access-Control-Allow-Origin': '*'
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare function getWebpackCommonSetup({ micrositeFolderPaths, packageJSON }: {
|
|
2
|
+
micrositeFolderPaths: any;
|
|
3
|
+
packageJSON: any;
|
|
4
|
+
}): {
|
|
5
|
+
entry: string[];
|
|
6
|
+
plugins: (import("clean-webpack-plugin").CleanWebpackPlugin | import("copy-webpack-plugin") | import("html-webpack-plugin") | import("webpack-manifest-plugin").WebpackManifestPlugin)[];
|
|
7
|
+
module: {
|
|
8
|
+
rules: ({
|
|
9
|
+
test: RegExp;
|
|
10
|
+
exclude: RegExp;
|
|
11
|
+
use: {
|
|
12
|
+
loader: string;
|
|
13
|
+
options: {
|
|
14
|
+
presets: (string | (string | {
|
|
15
|
+
modules: boolean;
|
|
16
|
+
useBuiltIns: string;
|
|
17
|
+
corejs: string;
|
|
18
|
+
targets: {
|
|
19
|
+
browsers: string[];
|
|
20
|
+
};
|
|
21
|
+
})[])[];
|
|
22
|
+
plugins: (string | (string | {
|
|
23
|
+
runtime: string;
|
|
24
|
+
})[])[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
} | {
|
|
28
|
+
test: RegExp;
|
|
29
|
+
type: string;
|
|
30
|
+
} | {
|
|
31
|
+
test: RegExp;
|
|
32
|
+
use: ({
|
|
33
|
+
loader: string;
|
|
34
|
+
options?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
loader: string;
|
|
37
|
+
options: {};
|
|
38
|
+
})[];
|
|
39
|
+
} | {
|
|
40
|
+
test: RegExp;
|
|
41
|
+
issuer: RegExp;
|
|
42
|
+
resourceQuery: {
|
|
43
|
+
not: RegExp[];
|
|
44
|
+
};
|
|
45
|
+
use: string[];
|
|
46
|
+
})[];
|
|
47
|
+
};
|
|
48
|
+
resolve: {
|
|
49
|
+
modules: any[];
|
|
50
|
+
extensions: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=commonSetup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonSetup.d.ts","sourceRoot":"","sources":["../../../src/webpack/setup/commonSetup.ts"],"names":[],"mappings":"AAWA,wBAAgB,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,WAAW,EAAE;;;CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB1E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackCommonSetup = getWebpackCommonSetup;
|
|
7
|
+
var _babelLoader = require("../loader/babelLoader");
|
|
8
|
+
var _fontLoader = require("../loader/fontLoader");
|
|
9
|
+
var _imageLoader = require("../loader/imageLoader");
|
|
10
|
+
var _svgrLoader = require("../loader/svgrLoader");
|
|
11
|
+
var _markdownLoader = require("../loader/markdownLoader");
|
|
12
|
+
var _cleanWebpackPlugin = require("../plugin/cleanWebpackPlugin");
|
|
13
|
+
var _copyWebpackPlugin = require("../plugin/copyWebpackPlugin");
|
|
14
|
+
var _htmlWebpackPlugin = require("../plugin/htmlWebpackPlugin");
|
|
15
|
+
var _webpackManifestPlugin = require("../plugin/webpackManifestPlugin");
|
|
16
|
+
var _constant = require("../constant");
|
|
17
|
+
function getWebpackCommonSetup(_ref) {
|
|
18
|
+
var micrositeFolderPaths = _ref.micrositeFolderPaths,
|
|
19
|
+
packageJSON = _ref.packageJSON;
|
|
20
|
+
return {
|
|
21
|
+
entry: ["".concat(micrositeFolderPaths.src, "/index.js")],
|
|
22
|
+
plugins: [(0, _cleanWebpackPlugin.getCleanWebpackPluginStandardSetup)(), (0, _copyWebpackPlugin.getCopyWebpackPluginStandardSetup)({
|
|
23
|
+
from: micrositeFolderPaths["public"],
|
|
24
|
+
to: 'assets'
|
|
25
|
+
}), (0, _htmlWebpackPlugin.getHtmlWebpackPluginStandardSetup)({
|
|
26
|
+
title: packageJSON.description,
|
|
27
|
+
micrositeWebpackFolderPath: micrositeFolderPaths.webpack
|
|
28
|
+
}), (0, _webpackManifestPlugin.getWebpackManifestPluginStandardSetup)()],
|
|
29
|
+
module: {
|
|
30
|
+
rules: [(0, _babelLoader.getBabelLoaderAdvancedSetup)(), (0, _fontLoader.getFontLoaderStandardSetup)(), (0, _imageLoader.getImageLoaderStandardSetup)(), (0, _markdownLoader.getMarkdownLoaderStandardSetup)(), (0, _svgrLoader.getSVGRLoaderAdvancedSetup)()]
|
|
31
|
+
},
|
|
32
|
+
resolve: {
|
|
33
|
+
modules: [micrositeFolderPaths.src, micrositeFolderPaths.nodeModules],
|
|
34
|
+
extensions: _constant.extensions
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function getWebpackDevelopmentSetup({ webpackCommonSetup, environmentVariablesFilePath, micrositeUrlPath, micrositeFolderPaths, includedSourceFilePaths, }: {
|
|
2
|
+
webpackCommonSetup: any;
|
|
3
|
+
environmentVariablesFilePath: any;
|
|
4
|
+
micrositeUrlPath: any;
|
|
5
|
+
micrositeFolderPaths: any;
|
|
6
|
+
includedSourceFilePaths: any;
|
|
7
|
+
}): any;
|
|
8
|
+
//# sourceMappingURL=developmentSetup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developmentSetup.d.ts","sourceRoot":"","sources":["../../../src/webpack/setup/developmentSetup.ts"],"names":[],"mappings":"AAQA,wBAAgB,0BAA0B,CAAC,EACzC,kBAAkB,EAClB,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,GACxB;;;;;;CAAA,OAqCA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackDevelopmentSetup = getWebpackDevelopmentSetup;
|
|
7
|
+
var _webpackMerge = require("webpack-merge");
|
|
8
|
+
var _cssLoader = require("../loader/cssLoader");
|
|
9
|
+
var _postCSSLoader = require("../loader/postCSSLoader");
|
|
10
|
+
var _sassLoader = require("../loader/sassLoader");
|
|
11
|
+
var _dotenvWebpack = require("../plugin/dotenvWebpack");
|
|
12
|
+
var _hotModuleReplacementPlugin = require("../plugin/hotModuleReplacementPlugin");
|
|
13
|
+
var _devServer = require("../server/devServer");
|
|
14
|
+
function getWebpackDevelopmentSetup(_ref) {
|
|
15
|
+
var webpackCommonSetup = _ref.webpackCommonSetup,
|
|
16
|
+
environmentVariablesFilePath = _ref.environmentVariablesFilePath,
|
|
17
|
+
micrositeUrlPath = _ref.micrositeUrlPath,
|
|
18
|
+
micrositeFolderPaths = _ref.micrositeFolderPaths,
|
|
19
|
+
includedSourceFilePaths = _ref.includedSourceFilePaths;
|
|
20
|
+
return (0, _webpackMerge.merge)([webpackCommonSetup, {
|
|
21
|
+
mode: 'development',
|
|
22
|
+
devtool: 'inline-source-map',
|
|
23
|
+
devServer: (0, _devServer.getDevServerStandardSetup)(),
|
|
24
|
+
output: {
|
|
25
|
+
path: micrositeFolderPaths.build,
|
|
26
|
+
publicPath: micrositeUrlPath,
|
|
27
|
+
filename: '[name].bundle.js'
|
|
28
|
+
},
|
|
29
|
+
optimization: {
|
|
30
|
+
concatenateModules: true
|
|
31
|
+
},
|
|
32
|
+
plugins: [(0, _dotenvWebpack.getDotenvWebpackStandardSetup)({
|
|
33
|
+
path: environmentVariablesFilePath
|
|
34
|
+
}), (0, _hotModuleReplacementPlugin.getHotModuleReplacementPluginStandardSetup)()],
|
|
35
|
+
module: {
|
|
36
|
+
rules: [{
|
|
37
|
+
test: /\.s[ac]ss$/i,
|
|
38
|
+
include: includedSourceFilePaths,
|
|
39
|
+
use: ['style-loader', (0, _cssLoader.getCSSLoaderStandardSetup)({
|
|
40
|
+
sourceMap: false,
|
|
41
|
+
modules: {
|
|
42
|
+
localIdentName: '[name]_[local]_[hash:base64:5]',
|
|
43
|
+
/* https://webpack.js.org/loaders/css-loader/#exportlocalsconvention */
|
|
44
|
+
exportLocalsConvention: 'as-is'
|
|
45
|
+
},
|
|
46
|
+
/* https://stackoverflow.com/questions/78589664/style-loader-does-not-recoginize-default-imports-of-css-modules-in-storybooks */
|
|
47
|
+
esModule: false
|
|
48
|
+
}), (0, _postCSSLoader.getPostCSSLoaderStandardSetup)(), (0, _sassLoader.getSassLoaderStandardSetup)({
|
|
49
|
+
includePaths: includedSourceFilePaths
|
|
50
|
+
})]
|
|
51
|
+
}]
|
|
52
|
+
}
|
|
53
|
+
}]);
|
|
54
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function getWebpackProductionSetup({ webpackCommonSetup, environmentVariablesFilePath, micrositeUrlPath, micrositeFolderPaths, packageJSON, }: {
|
|
2
|
+
webpackCommonSetup: any;
|
|
3
|
+
environmentVariablesFilePath: any;
|
|
4
|
+
micrositeUrlPath: any;
|
|
5
|
+
micrositeFolderPaths: any;
|
|
6
|
+
packageJSON: any;
|
|
7
|
+
}): any;
|
|
8
|
+
//# sourceMappingURL=productionSetup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productionSetup.d.ts","sourceRoot":"","sources":["../../../src/webpack/setup/productionSetup.ts"],"names":[],"mappings":"AAQA,wBAAgB,yBAAyB,CAAC,EACxC,kBAAkB,EAClB,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,GACZ;;;;;;CAAA,OAmDA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackProductionSetup = getWebpackProductionSetup;
|
|
7
|
+
var _webpackMerge = require("webpack-merge");
|
|
8
|
+
var _cssLoader = require("../loader/cssLoader");
|
|
9
|
+
var _bannerPlugin = require("../plugin/bannerPlugin");
|
|
10
|
+
var _cssMinimizerWebpackPlugin = require("../plugin/cssMinimizerWebpackPlugin");
|
|
11
|
+
var _dotenvWebpack = require("../plugin/dotenvWebpack");
|
|
12
|
+
var _miniCSSExtractPlugin = require("../plugin/miniCSSExtractPlugin");
|
|
13
|
+
var _webpackBundleAnalyzer = require("../plugin/webpackBundleAnalyzer");
|
|
14
|
+
function getWebpackProductionSetup(_ref) {
|
|
15
|
+
var webpackCommonSetup = _ref.webpackCommonSetup,
|
|
16
|
+
environmentVariablesFilePath = _ref.environmentVariablesFilePath,
|
|
17
|
+
micrositeUrlPath = _ref.micrositeUrlPath,
|
|
18
|
+
micrositeFolderPaths = _ref.micrositeFolderPaths,
|
|
19
|
+
packageJSON = _ref.packageJSON;
|
|
20
|
+
return (0, _webpackMerge.merge)([webpackCommonSetup, {
|
|
21
|
+
mode: 'production',
|
|
22
|
+
devtool: false,
|
|
23
|
+
output: {
|
|
24
|
+
path: micrositeFolderPaths.build,
|
|
25
|
+
publicPath: micrositeUrlPath,
|
|
26
|
+
filename: 'js/[name].[contenthash].bundle.js'
|
|
27
|
+
},
|
|
28
|
+
performance: {
|
|
29
|
+
hints: false,
|
|
30
|
+
maxEntrypointSize: 512000,
|
|
31
|
+
maxAssetSize: 512000
|
|
32
|
+
},
|
|
33
|
+
optimization: {
|
|
34
|
+
minimize: true,
|
|
35
|
+
minimizer: [(0, _cssMinimizerWebpackPlugin.getCSSMinimizerWebpackPluginStandardSetup)(), '...'],
|
|
36
|
+
runtimeChunk: {
|
|
37
|
+
name: 'runtime'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
plugins: [(0, _bannerPlugin.getBannerPluginStandardSetup)(packageJSON), (0, _dotenvWebpack.getDotenvWebpackStandardSetup)({
|
|
41
|
+
path: environmentVariablesFilePath
|
|
42
|
+
}), (0, _miniCSSExtractPlugin.getMiniCSSExtractPluginAdvancedSetup)(), (0, _webpackBundleAnalyzer.getWebpackBundleAnalyzerStandardSetup)()],
|
|
43
|
+
module: {
|
|
44
|
+
rules: [{
|
|
45
|
+
test: /\.(sass|scss|css)$/,
|
|
46
|
+
use: [_miniCSSExtractPlugin.MiniCSSExtractPluginLoader, (0, _cssLoader.getCSSLoaderStandardSetup)({
|
|
47
|
+
sourceMap: false,
|
|
48
|
+
modules: {
|
|
49
|
+
localIdentName: '[name]_[local]_[hash:base64:5]',
|
|
50
|
+
/* https://webpack.js.org/loaders/css-loader/#exportlocalsconvention */
|
|
51
|
+
exportLocalsConvention: 'as-is'
|
|
52
|
+
},
|
|
53
|
+
/* https://stackoverflow.com/questions/78589664/style-loader-does-not-recoginize-default-imports-of-css-modules-in-storybooks */
|
|
54
|
+
esModule: false
|
|
55
|
+
}), 'postcss-loader', 'sass-loader']
|
|
56
|
+
}]
|
|
57
|
+
}
|
|
58
|
+
}]);
|
|
59
|
+
}
|
package/storybook/index.ts
DELETED