@elliemae/pui-cli 6.0.0-beta.10 → 6.0.0-beta.14
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/lib/esbuild.js +19 -3
- package/lib/lint/eslint/common.js +1 -0
- package/lib/webpack/helpers.js +1 -2
- package/lib/webpack/webpack.storybook.js +0 -16
- package/package.json +23 -26
package/lib/esbuild.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const esbuild = require('esbuild');
|
|
2
2
|
const fg = require('fast-glob');
|
|
3
|
+
const fs = require('fs');
|
|
3
4
|
|
|
4
5
|
const ESBUILD_TARGET = 'es2020';
|
|
5
6
|
|
|
@@ -10,7 +11,18 @@ const commonConfig = {
|
|
|
10
11
|
mainFields: ['module', 'browser', 'main'],
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
+
const distFolder = 'dist';
|
|
15
|
+
|
|
16
|
+
const copyFiles = async ({ srcdir, outdir }) => {
|
|
17
|
+
const files = await fg([
|
|
18
|
+
`${srcdir}/**/*.*`,
|
|
19
|
+
`!${srcdir}/**/*.{js,jsx,ts,tsx,cjs,mjs}`,
|
|
20
|
+
]);
|
|
21
|
+
files.forEach((srcFilePath) => {
|
|
22
|
+
const destFilePath = srcFilePath.replace(srcdir, outdir);
|
|
23
|
+
fs.copyFileSync(srcFilePath, destFilePath);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
14
26
|
|
|
15
27
|
const build = async ({ srcPath, commonJS }) => {
|
|
16
28
|
const inputFiles = [
|
|
@@ -20,23 +32,27 @@ const build = async ({ srcPath, commonJS }) => {
|
|
|
20
32
|
`!${srcPath}/**/*.endpoint.{js,jsx,ts,tsx}`,
|
|
21
33
|
];
|
|
22
34
|
if (!commonJS) {
|
|
35
|
+
const outdir = `${distFolder}/es`;
|
|
23
36
|
const entryPoints = await fg(inputFiles);
|
|
24
37
|
await esbuild.build({
|
|
25
38
|
entryPoints,
|
|
26
39
|
...commonConfig,
|
|
27
|
-
outdir
|
|
40
|
+
outdir,
|
|
28
41
|
format: 'esm',
|
|
29
42
|
});
|
|
43
|
+
await copyFiles({ srcdir: srcPath, outdir });
|
|
30
44
|
} else {
|
|
45
|
+
const outdir = `${distFolder}/cjs`;
|
|
31
46
|
const commonJSEntryPoints = await fg(
|
|
32
47
|
inputFiles.concat([`${srcPath}/**/*.cjs`]),
|
|
33
48
|
);
|
|
34
49
|
await esbuild.build({
|
|
35
50
|
entryPoints: commonJSEntryPoints,
|
|
36
51
|
...commonConfig,
|
|
37
|
-
outdir
|
|
52
|
+
outdir,
|
|
38
53
|
format: 'cjs',
|
|
39
54
|
});
|
|
55
|
+
await copyFiles({ srcdir: srcPath, outdir });
|
|
40
56
|
}
|
|
41
57
|
};
|
|
42
58
|
|
package/lib/webpack/helpers.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
1
2
|
const path = require('path');
|
|
2
3
|
const fs = require('fs');
|
|
3
4
|
const _ = require('lodash');
|
|
@@ -69,7 +70,6 @@ const getAlias = () =>
|
|
|
69
70
|
'@babel/runtime',
|
|
70
71
|
'react',
|
|
71
72
|
'react-dom',
|
|
72
|
-
'react-router-dom',
|
|
73
73
|
'react-redux',
|
|
74
74
|
'redux',
|
|
75
75
|
'redux-saga',
|
|
@@ -122,7 +122,6 @@ const getAppLoaderFileName = () => {
|
|
|
122
122
|
|
|
123
123
|
const getDiagnosticsFileName = () => {
|
|
124
124
|
const libName = 'emuiDiagnostics';
|
|
125
|
-
// eslint-disable-next-line max-lines
|
|
126
125
|
const libPath = path.join(
|
|
127
126
|
process.cwd(),
|
|
128
127
|
'node_modules/@elliemae/pui-diagnostics/dist/public/js',
|
|
@@ -8,9 +8,7 @@ const {
|
|
|
8
8
|
isApp,
|
|
9
9
|
getAlias,
|
|
10
10
|
excludeNodeModulesExcept,
|
|
11
|
-
modulesToTranspile,
|
|
12
11
|
} = require('./helpers');
|
|
13
|
-
const { ESBUILD_TARGET } = require('../esbuild');
|
|
14
12
|
|
|
15
13
|
const IS_APP = isApp();
|
|
16
14
|
const CWD = process.cwd();
|
|
@@ -91,20 +89,6 @@ const getModulePreRules = () => [
|
|
|
91
89
|
];
|
|
92
90
|
|
|
93
91
|
const getModuleRules = () => [
|
|
94
|
-
{
|
|
95
|
-
test: /\.(js|ts|jsx|tsx)$/,
|
|
96
|
-
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
97
|
-
resolve: {
|
|
98
|
-
fullySpecified: false,
|
|
99
|
-
},
|
|
100
|
-
use: {
|
|
101
|
-
loader: 'esbuild-loader',
|
|
102
|
-
options: {
|
|
103
|
-
loader: 'jsx',
|
|
104
|
-
target: ESBUILD_TARGET,
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
92
|
{
|
|
109
93
|
test: /\.(woff|woff2)$/,
|
|
110
94
|
exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "EllieMae Platform UI CLI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -70,30 +70,25 @@
|
|
|
70
70
|
"@semantic-release/changelog": "~6.0.1",
|
|
71
71
|
"@semantic-release/exec": "~6.0.2",
|
|
72
72
|
"@semantic-release/git": "~10.0.1",
|
|
73
|
-
"@storybook/addon-a11y": "~6.4.
|
|
74
|
-
"@storybook/addon-
|
|
75
|
-
"@storybook/addon-backgrounds": "~6.4.0",
|
|
76
|
-
"@storybook/addon-controls": "~6.4.0",
|
|
77
|
-
"@storybook/addon-docs": "~6.4.0",
|
|
73
|
+
"@storybook/addon-a11y": "~6.4.4",
|
|
74
|
+
"@storybook/addon-essentials": "~6.4.4",
|
|
78
75
|
"@storybook/addon-events": "~6.2.9",
|
|
79
|
-
"@storybook/addon-
|
|
80
|
-
"@storybook/addon-
|
|
81
|
-
"@storybook/addon-
|
|
82
|
-
"@storybook/
|
|
83
|
-
"@storybook/
|
|
84
|
-
"@storybook/
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@storybook/react": "~6.4.0",
|
|
87
|
-
"@storybook/theming": "~6.4.0",
|
|
76
|
+
"@storybook/addon-interactions": "~6.4.4",
|
|
77
|
+
"@storybook/addon-links": "~6.4.4",
|
|
78
|
+
"@storybook/addon-storysource": "~6.4.4",
|
|
79
|
+
"@storybook/builder-webpack5": "~6.4.4",
|
|
80
|
+
"@storybook/manager-webpack5": "~6.4.4",
|
|
81
|
+
"@storybook/react": "~6.4.4",
|
|
82
|
+
"@storybook/theming": "~6.4.4",
|
|
88
83
|
"@stylelint/postcss-css-in-js": "~0.37.2",
|
|
89
|
-
"@svgr/webpack": "~6.
|
|
84
|
+
"@svgr/webpack": "~6.1.0",
|
|
90
85
|
"@testing-library/jest-dom": "~5.15.1",
|
|
91
86
|
"@testing-library/react": "~12.1.2",
|
|
92
87
|
"@testing-library/react-hooks": "~7.0.2",
|
|
93
88
|
"@types/jest": "~27.0.3",
|
|
94
|
-
"@types/node": "~16.11.
|
|
89
|
+
"@types/node": "~16.11.11",
|
|
95
90
|
"@types/rimraf": "~3.0.2",
|
|
96
|
-
"@types/testing-library__jest-dom": "~5.14.
|
|
91
|
+
"@types/testing-library__jest-dom": "~5.14.2",
|
|
97
92
|
"@typescript-eslint/eslint-plugin": "~5.5.0",
|
|
98
93
|
"@typescript-eslint/parser": "~5.5.0",
|
|
99
94
|
"autoprefixer": "~10.4.0",
|
|
@@ -130,7 +125,7 @@
|
|
|
130
125
|
"dotenv": "~10.0.0",
|
|
131
126
|
"dotenv-webpack": "~7.0.3",
|
|
132
127
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
133
|
-
"esbuild": "~0.14.
|
|
128
|
+
"esbuild": "~0.14.1",
|
|
134
129
|
"esbuild-jest": "~0.5.0",
|
|
135
130
|
"esbuild-loader": "~2.16.0",
|
|
136
131
|
"eslint": "~8.3.0",
|
|
@@ -146,14 +141,15 @@
|
|
|
146
141
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
147
142
|
"eslint-plugin-import": "~2.25.3",
|
|
148
143
|
"eslint-plugin-jest": "~25.3.0",
|
|
149
|
-
"eslint-plugin-jsdoc": "~37.0
|
|
144
|
+
"eslint-plugin-jsdoc": "~37.1.0",
|
|
150
145
|
"eslint-plugin-jsx-a11y": "~6.5.1",
|
|
151
146
|
"eslint-plugin-mdx": "~1.16.0",
|
|
152
147
|
"eslint-plugin-prettier": "~4.0.0",
|
|
153
148
|
"eslint-plugin-react": "~7.27.1",
|
|
154
149
|
"eslint-plugin-react-hooks": "~4.3.0",
|
|
155
150
|
"eslint-plugin-redux-saga": "~1.2.1",
|
|
156
|
-
"eslint-plugin-
|
|
151
|
+
"eslint-plugin-storybook": "~0.5.1",
|
|
152
|
+
"eslint-plugin-testing-library": "~5.0.1",
|
|
157
153
|
"eslint-plugin-wdio": "~7.4.2",
|
|
158
154
|
"execa": "~5.1.1",
|
|
159
155
|
"express": "~4.17.1",
|
|
@@ -170,7 +166,7 @@
|
|
|
170
166
|
"imports-loader": "~3.1.1",
|
|
171
167
|
"ip": "~1.1.5",
|
|
172
168
|
"jest-axe": "~5.0.1",
|
|
173
|
-
"jest-cli": "~27.4.
|
|
169
|
+
"jest-cli": "~27.4.3",
|
|
174
170
|
"jest-sonar-reporter": "~2.0.0",
|
|
175
171
|
"jest-styled-components": "~7.0.8",
|
|
176
172
|
"jscodeshift": "~0.13.0",
|
|
@@ -185,7 +181,7 @@
|
|
|
185
181
|
"nodemon": "~2.0.15",
|
|
186
182
|
"npm-check-updates": "12.0.2",
|
|
187
183
|
"null-loader": "~4.0.1",
|
|
188
|
-
"pino": "~7.5.
|
|
184
|
+
"pino": "~7.5.1",
|
|
189
185
|
"pino-pretty": "~7.2.0",
|
|
190
186
|
"pinst": "~2.1.6",
|
|
191
187
|
"plop": "~3.0.1",
|
|
@@ -213,6 +209,7 @@
|
|
|
213
209
|
"slackify-markdown": "~4.3.0",
|
|
214
210
|
"storybook-builder-vite": "~0.1.10",
|
|
215
211
|
"storybook-addon-turbo-build": "~1.0.1",
|
|
212
|
+
"storybook-react-router": "~1.0.8",
|
|
216
213
|
"style-loader": "~3.3.1",
|
|
217
214
|
"stylelint": "~14.1.0",
|
|
218
215
|
"stylelint-config-recommended": "~6.0.0",
|
|
@@ -223,11 +220,11 @@
|
|
|
223
220
|
"svgo": "~2.8.0",
|
|
224
221
|
"terser-webpack-plugin": "~5.2.5",
|
|
225
222
|
"ts-node": "~10.4.0",
|
|
226
|
-
"tsc-alias": "~1.4.
|
|
223
|
+
"tsc-alias": "~1.4.2",
|
|
227
224
|
"tsc-files": "~1.1.3",
|
|
228
225
|
"tsconfig-paths": "~3.12.0",
|
|
229
226
|
"tsconfig-paths-webpack-plugin": "~3.5.2",
|
|
230
|
-
"type-fest": "~2.
|
|
227
|
+
"type-fest": "~2.8.0",
|
|
231
228
|
"typescript": "~4.5.2",
|
|
232
229
|
"update-notifier": "~5.1.0",
|
|
233
230
|
"url-loader": "~4.1.1",
|
|
@@ -244,7 +241,7 @@
|
|
|
244
241
|
"webpack-strip-block": "~0.3.0",
|
|
245
242
|
"whatwg-fetch": "~3.6.2",
|
|
246
243
|
"workbox-webpack-plugin": "~6.4.1",
|
|
247
|
-
"yargs": "~17.
|
|
244
|
+
"yargs": "~17.3.0"
|
|
248
245
|
},
|
|
249
246
|
"devDependencies": {
|
|
250
247
|
"redux": "~4.1.2",
|