@elliemae/pui-cli 7.2.0 → 7.2.1
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/dist/cjs/webpack/helpers.js +2 -0
- package/dist/cjs/webpack/webpack.lib.base.babel.js +1 -6
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +2 -11
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +1 -2
- package/dist/esm/webpack/helpers.js +2 -0
- package/dist/esm/webpack/webpack.lib.base.babel.js +2 -7
- package/dist/esm/webpack/webpack.lib.dev.babel.js +3 -12
- package/dist/esm/webpack/webpack.lib.prod.babel.js +2 -3
- package/dist/types/webpack/helpers.d.ts +1 -0
- package/dist/types/webpack/webpack.lib.base.babel.d.ts +0 -8
- package/dist/types/webpack/webpack.lib.dev.babel.d.ts +0 -8
- package/dist/types/webpack/webpack.lib.prod.babel.d.ts +0 -8
- package/package.json +1 -1
|
@@ -31,6 +31,7 @@ __export(helpers_exports, {
|
|
|
31
31
|
getAppVersion: () => getAppVersion,
|
|
32
32
|
getCompressionPlugins: () => getCompressionPlugins,
|
|
33
33
|
getLibraryName: () => getLibraryName,
|
|
34
|
+
getLibraryVariableName: () => getLibraryVariableName,
|
|
34
35
|
getMediaPath: () => getMediaPath,
|
|
35
36
|
getPaths: () => getPaths,
|
|
36
37
|
isAppLoaderEnabled: () => isAppLoaderEnabled,
|
|
@@ -75,6 +76,7 @@ const getLibraryName = () => {
|
|
|
75
76
|
const modifiedLibName = `emui-${libraryName.replace("@elliemae/", "").replace("pui-", "")}`;
|
|
76
77
|
return import_lodash.default.camelCase(modifiedLibName);
|
|
77
78
|
};
|
|
79
|
+
const getLibraryVariableName = () => process.env.LIBRARY_VARIABLE_NAME || getLibraryName();
|
|
78
80
|
const mapToFolder = (dependencies, folder) => dependencies.reduce(
|
|
79
81
|
(acc, dependency) => ({
|
|
80
82
|
[dependency]: import_node_path.default.resolve(`${folder}/${dependency.replace("$", "")}`),
|
|
@@ -81,7 +81,7 @@ const baseConfig = (options) => ({
|
|
|
81
81
|
clean: true,
|
|
82
82
|
path: import_node_path.default.resolve(process.cwd(), "dist/umd"),
|
|
83
83
|
publicPath: "auto",
|
|
84
|
-
library:
|
|
84
|
+
library: (0, import_helpers.getLibraryVariableName)(),
|
|
85
85
|
libraryTarget: "umd",
|
|
86
86
|
...options.output
|
|
87
87
|
},
|
|
@@ -161,11 +161,6 @@ const baseConfig = (options) => ({
|
|
|
161
161
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
|
|
162
162
|
type: "asset"
|
|
163
163
|
},
|
|
164
|
-
{
|
|
165
|
-
test: new RegExp("(?<!\\/iframe)\\.html$"),
|
|
166
|
-
exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
|
|
167
|
-
use: "html-loader"
|
|
168
|
-
},
|
|
169
164
|
{
|
|
170
165
|
test: /\.(mp4|webm)$/,
|
|
171
166
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
|
|
@@ -34,7 +34,6 @@ var import_mini_css_extract_plugin = __toESM(require("mini-css-extract-plugin"),
|
|
|
34
34
|
var import_html_webpack_plugin = __toESM(require("html-webpack-plugin"), 1);
|
|
35
35
|
var import_helpers = require("./helpers.js");
|
|
36
36
|
var import_webpack_lib_base_babel = require("./webpack.lib.base.babel.js");
|
|
37
|
-
const libraryName = (0, import_helpers.getLibraryName)();
|
|
38
37
|
const { basePath } = (0, import_helpers.getPaths)();
|
|
39
38
|
const getHtmlWebpackPlugins = () => {
|
|
40
39
|
const htmlTemplateFiles = import_fast_glob.default.sync([import_node_path.default.join(process.cwd(), "lib/*.html")]);
|
|
@@ -42,18 +41,13 @@ const getHtmlWebpackPlugins = () => {
|
|
|
42
41
|
(htmlTemplateFile) => new import_html_webpack_plugin.default({
|
|
43
42
|
template: htmlTemplateFile,
|
|
44
43
|
filename: import_node_path.default.basename(htmlTemplateFile),
|
|
45
|
-
|
|
44
|
+
library: (0, import_helpers.getLibraryVariableName)(),
|
|
46
45
|
inject: true
|
|
47
46
|
})
|
|
48
47
|
);
|
|
49
48
|
};
|
|
50
49
|
var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig)({
|
|
51
50
|
mode: "development",
|
|
52
|
-
output: {
|
|
53
|
-
filename: `js/${libraryName}.js`,
|
|
54
|
-
chunkFilename: `js/${libraryName}.chunk.js`,
|
|
55
|
-
assetModuleFilename: "[name][ext][query]"
|
|
56
|
-
},
|
|
57
51
|
optimization: {
|
|
58
52
|
splitChunks: {
|
|
59
53
|
chunks: "all"
|
|
@@ -68,10 +62,7 @@ var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig
|
|
|
68
62
|
exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
|
|
69
63
|
failOnError: false
|
|
70
64
|
}),
|
|
71
|
-
new import_mini_css_extract_plugin.default({
|
|
72
|
-
filename: `css/${libraryName}.css`,
|
|
73
|
-
chunkFilename: `css/${libraryName}.chunk.css`
|
|
74
|
-
})
|
|
65
|
+
new import_mini_css_extract_plugin.default({})
|
|
75
66
|
],
|
|
76
67
|
devtool: "eval-source-map",
|
|
77
68
|
performance: {
|
|
@@ -36,14 +36,13 @@ var import_esbuild_loader = require("esbuild-loader");
|
|
|
36
36
|
var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"), 1);
|
|
37
37
|
var import_helpers = require("./helpers.js");
|
|
38
38
|
var import_webpack_lib_base_babel = require("./webpack.lib.base.babel.js");
|
|
39
|
-
const libraryName = process.env.LIBRARY_FILE_NAME || (0, import_helpers.getLibraryName)();
|
|
40
39
|
const getHtmlWebpackPlugins = () => {
|
|
41
40
|
const htmlTemplateFiles = import_fast_glob.default.sync([import_node_path.default.join(process.cwd(), "lib/*.html")]);
|
|
42
41
|
return htmlTemplateFiles.map(
|
|
43
42
|
(htmlTemplateFile) => new import_html_webpack_plugin.default({
|
|
44
43
|
template: htmlTemplateFile,
|
|
45
44
|
filename: import_node_path.default.basename(htmlTemplateFile),
|
|
46
|
-
|
|
45
|
+
library: (0, import_helpers.getLibraryVariableName)(),
|
|
47
46
|
inject: true,
|
|
48
47
|
minify: {
|
|
49
48
|
removeComments: true,
|
|
@@ -32,6 +32,7 @@ const getLibraryName = () => {
|
|
|
32
32
|
const modifiedLibName = `emui-${libraryName.replace("@elliemae/", "").replace("pui-", "")}`;
|
|
33
33
|
return _.camelCase(modifiedLibName);
|
|
34
34
|
};
|
|
35
|
+
const getLibraryVariableName = () => process.env.LIBRARY_VARIABLE_NAME || getLibraryName();
|
|
35
36
|
const mapToFolder = (dependencies, folder) => dependencies.reduce(
|
|
36
37
|
(acc, dependency) => ({
|
|
37
38
|
[dependency]: path.resolve(`${folder}/${dependency.replace("$", "")}`),
|
|
@@ -200,6 +201,7 @@ export {
|
|
|
200
201
|
getAppVersion,
|
|
201
202
|
getCompressionPlugins,
|
|
202
203
|
getLibraryName,
|
|
204
|
+
getLibraryVariableName,
|
|
203
205
|
getMediaPath,
|
|
204
206
|
getPaths,
|
|
205
207
|
isAppLoaderEnabled,
|
|
@@ -9,7 +9,7 @@ import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
|
|
|
9
9
|
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
10
10
|
import {
|
|
11
11
|
excludeNodeModulesExcept,
|
|
12
|
-
|
|
12
|
+
getLibraryVariableName,
|
|
13
13
|
modulesToTranspile,
|
|
14
14
|
getAlias,
|
|
15
15
|
filterByFilePresence
|
|
@@ -58,7 +58,7 @@ const baseConfig = (options) => ({
|
|
|
58
58
|
clean: true,
|
|
59
59
|
path: path.resolve(process.cwd(), "dist/umd"),
|
|
60
60
|
publicPath: "auto",
|
|
61
|
-
library:
|
|
61
|
+
library: getLibraryVariableName(),
|
|
62
62
|
libraryTarget: "umd",
|
|
63
63
|
...options.output
|
|
64
64
|
},
|
|
@@ -138,11 +138,6 @@ const baseConfig = (options) => ({
|
|
|
138
138
|
exclude: excludeNodeModulesExcept(["@elliemae/*"]),
|
|
139
139
|
type: "asset"
|
|
140
140
|
},
|
|
141
|
-
{
|
|
142
|
-
test: new RegExp("(?<!\\/iframe)\\.html$"),
|
|
143
|
-
exclude: excludeNodeModulesExcept(["@elliemae/*"]),
|
|
144
|
-
use: "html-loader"
|
|
145
|
-
},
|
|
146
141
|
{
|
|
147
142
|
test: /\.(mp4|webm)$/,
|
|
148
143
|
exclude: excludeNodeModulesExcept(["@elliemae/*"]),
|
|
@@ -3,9 +3,8 @@ import fg from "fast-glob";
|
|
|
3
3
|
import CircularDependencyPlugin from "circular-dependency-plugin";
|
|
4
4
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
5
5
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
6
|
-
import {
|
|
6
|
+
import { getLibraryVariableName, getPaths } from "./helpers.js";
|
|
7
7
|
import { baseConfig } from "./webpack.lib.base.babel.js";
|
|
8
|
-
const libraryName = getLibraryName();
|
|
9
8
|
const { basePath } = getPaths();
|
|
10
9
|
const getHtmlWebpackPlugins = () => {
|
|
11
10
|
const htmlTemplateFiles = fg.sync([path.join(process.cwd(), "lib/*.html")]);
|
|
@@ -13,18 +12,13 @@ const getHtmlWebpackPlugins = () => {
|
|
|
13
12
|
(htmlTemplateFile) => new HtmlWebpackPlugin({
|
|
14
13
|
template: htmlTemplateFile,
|
|
15
14
|
filename: path.basename(htmlTemplateFile),
|
|
16
|
-
|
|
15
|
+
library: getLibraryVariableName(),
|
|
17
16
|
inject: true
|
|
18
17
|
})
|
|
19
18
|
);
|
|
20
19
|
};
|
|
21
20
|
var webpack_lib_dev_babel_default = baseConfig({
|
|
22
21
|
mode: "development",
|
|
23
|
-
output: {
|
|
24
|
-
filename: `js/${libraryName}.js`,
|
|
25
|
-
chunkFilename: `js/${libraryName}.chunk.js`,
|
|
26
|
-
assetModuleFilename: "[name][ext][query]"
|
|
27
|
-
},
|
|
28
22
|
optimization: {
|
|
29
23
|
splitChunks: {
|
|
30
24
|
chunks: "all"
|
|
@@ -39,10 +33,7 @@ var webpack_lib_dev_babel_default = baseConfig({
|
|
|
39
33
|
exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
|
|
40
34
|
failOnError: false
|
|
41
35
|
}),
|
|
42
|
-
new MiniCssExtractPlugin({
|
|
43
|
-
filename: `css/${libraryName}.css`,
|
|
44
|
-
chunkFilename: `css/${libraryName}.chunk.css`
|
|
45
|
-
})
|
|
36
|
+
new MiniCssExtractPlugin({})
|
|
46
37
|
],
|
|
47
38
|
devtool: "eval-source-map",
|
|
48
39
|
performance: {
|
|
@@ -5,16 +5,15 @@ import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
|
5
5
|
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
6
6
|
import { ESBuildMinifyPlugin } from "esbuild-loader";
|
|
7
7
|
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
8
|
-
import {
|
|
8
|
+
import { getLibraryVariableName, getCompressionPlugins } from "./helpers.js";
|
|
9
9
|
import { baseConfig } from "./webpack.lib.base.babel.js";
|
|
10
|
-
const libraryName = process.env.LIBRARY_FILE_NAME || getLibraryName();
|
|
11
10
|
const getHtmlWebpackPlugins = () => {
|
|
12
11
|
const htmlTemplateFiles = fg.sync([path.join(process.cwd(), "lib/*.html")]);
|
|
13
12
|
return htmlTemplateFiles.map(
|
|
14
13
|
(htmlTemplateFile) => new HtmlWebpackPlugin({
|
|
15
14
|
template: htmlTemplateFile,
|
|
16
15
|
filename: path.basename(htmlTemplateFile),
|
|
17
|
-
|
|
16
|
+
library: getLibraryVariableName(),
|
|
18
17
|
inject: true,
|
|
19
18
|
minify: {
|
|
20
19
|
removeComments: true,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export const LATEST_VERSION: "latest";
|
|
3
3
|
export function excludeNodeModulesExcept(modules: any): (modulePath: any) => boolean;
|
|
4
4
|
export function getLibraryName(): string;
|
|
5
|
+
export function getLibraryVariableName(): string;
|
|
5
6
|
export function mapToFolder(dependencies: any, folder: any): any;
|
|
6
7
|
export function getAlias(): any;
|
|
7
8
|
export const modulesToTranspile: string[];
|
|
@@ -72,14 +72,6 @@ export function baseConfig(options: any): {
|
|
|
72
72
|
use: string[];
|
|
73
73
|
resolve?: undefined;
|
|
74
74
|
type?: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
test: RegExp;
|
|
77
|
-
exclude: (modulePath: any) => boolean;
|
|
78
|
-
use: string;
|
|
79
|
-
resolve?: undefined;
|
|
80
|
-
type?: undefined;
|
|
81
|
-
issuer?: undefined;
|
|
82
|
-
resourceQuery?: undefined;
|
|
83
75
|
} | {
|
|
84
76
|
resourceQuery: RegExp;
|
|
85
77
|
type: string;
|
|
@@ -72,14 +72,6 @@ declare const _default: {
|
|
|
72
72
|
use: string[];
|
|
73
73
|
resolve?: undefined;
|
|
74
74
|
type?: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
test: RegExp;
|
|
77
|
-
exclude: (modulePath: any) => boolean;
|
|
78
|
-
use: string;
|
|
79
|
-
resolve?: undefined;
|
|
80
|
-
type?: undefined;
|
|
81
|
-
issuer?: undefined;
|
|
82
|
-
resourceQuery?: undefined;
|
|
83
75
|
} | {
|
|
84
76
|
resourceQuery: RegExp;
|
|
85
77
|
type: string;
|
|
@@ -72,14 +72,6 @@ declare const _default: {
|
|
|
72
72
|
use: string[];
|
|
73
73
|
resolve?: undefined;
|
|
74
74
|
type?: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
test: RegExp;
|
|
77
|
-
exclude: (modulePath: any) => boolean;
|
|
78
|
-
use: string;
|
|
79
|
-
resolve?: undefined;
|
|
80
|
-
type?: undefined;
|
|
81
|
-
issuer?: undefined;
|
|
82
|
-
resourceQuery?: undefined;
|
|
83
75
|
} | {
|
|
84
76
|
resourceQuery: RegExp;
|
|
85
77
|
type: string;
|