@elliemae/pui-cli 9.0.0-next.51 → 9.0.0-next.52
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/babel.config.cjs +86 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/babel.config.cjs +86 -0
- package/dist/esm/index.cjs +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/types/lib/{babel.config.d.ts → babel.config.d.cts} +3 -2
- package/dist/types/lib/babel.config.d.cts.map +1 -0
- package/dist/types/lib/index.d.cts +2 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/cjs/babel.config.js +0 -99
- package/dist/esm/babel.config.js +0 -79
- package/dist/types/lib/babel.config.d.ts.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const { isApp } = require('./utils.cjs');
|
|
2
|
+
|
|
3
|
+
const nodeEnvPreset = {
|
|
4
|
+
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
5
|
+
targets: {
|
|
6
|
+
node: 'current',
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const webEnvPreset = {
|
|
11
|
+
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
12
|
+
useBuiltIns: 'usage',
|
|
13
|
+
corejs: { version: '3.36', proposals: true },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const presetEnvOptions =
|
|
17
|
+
process.env.TARGET_ENV === 'node' ? nodeEnvPreset : webEnvPreset;
|
|
18
|
+
|
|
19
|
+
const config = {
|
|
20
|
+
ignore: [/\/core-js/],
|
|
21
|
+
sourceType: 'unambiguous',
|
|
22
|
+
presets: [
|
|
23
|
+
['@babel/preset-env', presetEnvOptions],
|
|
24
|
+
['@babel/preset-react', { runtime: 'automatic' }],
|
|
25
|
+
'@babel/preset-typescript',
|
|
26
|
+
],
|
|
27
|
+
plugins: [
|
|
28
|
+
[
|
|
29
|
+
'babel-plugin-module-resolver',
|
|
30
|
+
{
|
|
31
|
+
alias: {
|
|
32
|
+
'@': isApp() ? './app' : './lib',
|
|
33
|
+
},
|
|
34
|
+
stripExtensions: [],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
['babel-plugin-styled-components', { displayName: true }],
|
|
38
|
+
['@babel/plugin-transform-runtime', { regenerator: true }],
|
|
39
|
+
'@babel/plugin-proposal-class-properties',
|
|
40
|
+
'@babel/plugin-syntax-dynamic-import',
|
|
41
|
+
'@babel/plugin-proposal-export-default-from',
|
|
42
|
+
'lodash',
|
|
43
|
+
'date-fns',
|
|
44
|
+
],
|
|
45
|
+
env: {
|
|
46
|
+
development: {
|
|
47
|
+
plugins: [
|
|
48
|
+
['babel-plugin-styled-components', { displayName: true }],
|
|
49
|
+
'@babel/plugin-transform-react-jsx-source',
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
production: {
|
|
53
|
+
plugins: [
|
|
54
|
+
['babel-plugin-styled-components', { displayName: false, pure: true }],
|
|
55
|
+
['transform-remove-console', { exclude: ['error', 'warn'] }],
|
|
56
|
+
'transform-react-remove-prop-types',
|
|
57
|
+
'@babel/plugin-transform-react-inline-elements',
|
|
58
|
+
'@babel/plugin-transform-react-constant-elements',
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
test: {
|
|
62
|
+
plugins: [
|
|
63
|
+
['babel-plugin-styled-components', { displayName: true }],
|
|
64
|
+
'@babel/plugin-transform-modules-commonjs',
|
|
65
|
+
'dynamic-import-node',
|
|
66
|
+
[
|
|
67
|
+
'babel-plugin-transform-strip-block',
|
|
68
|
+
{
|
|
69
|
+
requireDirective: true,
|
|
70
|
+
identifiers: [{ start: 'block:start', end: 'block:end' }],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
'babel-plugin-import-remove-resource-query',
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
if (
|
|
80
|
+
process.env.STORYBOOK_BUILD !== 'true' &&
|
|
81
|
+
process.env.TARGET_ENV !== 'node'
|
|
82
|
+
) {
|
|
83
|
+
config.env?.development?.plugins?.push?.('react-refresh/babel');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.babelConfig = config;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
const { babelConfig } = require('./babel.config.cjs');
|
|
1
2
|
const { jestConfig } = require('./testing/jest.config.cjs');
|
|
2
3
|
const { jestNodeConfig } = require('./testing/jest.node.config.cjs');
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
6
|
+
babelConfig,
|
|
5
7
|
jestConfig,
|
|
6
8
|
jestNodeConfig,
|
|
7
9
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(lib_exports, {
|
|
|
32
32
|
webpackFinal: () => import_webpack_storybook.webpackFinal
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(lib_exports);
|
|
35
|
-
var import_babel_config = require("./babel.config.
|
|
35
|
+
var import_babel_config = require("./babel.config.cjs");
|
|
36
36
|
var import_config = require("./lint-config/eslint/config.js");
|
|
37
37
|
var import_react = require("./lint-config/eslint/react.js");
|
|
38
38
|
var import_stylelint_config = require("./lint-config/stylelint.config.js");
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const { isApp } = require('./utils.cjs');
|
|
2
|
+
|
|
3
|
+
const nodeEnvPreset = {
|
|
4
|
+
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
5
|
+
targets: {
|
|
6
|
+
node: 'current',
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const webEnvPreset = {
|
|
11
|
+
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
12
|
+
useBuiltIns: 'usage',
|
|
13
|
+
corejs: { version: '3.36', proposals: true },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const presetEnvOptions =
|
|
17
|
+
process.env.TARGET_ENV === 'node' ? nodeEnvPreset : webEnvPreset;
|
|
18
|
+
|
|
19
|
+
const config = {
|
|
20
|
+
ignore: [/\/core-js/],
|
|
21
|
+
sourceType: 'unambiguous',
|
|
22
|
+
presets: [
|
|
23
|
+
['@babel/preset-env', presetEnvOptions],
|
|
24
|
+
['@babel/preset-react', { runtime: 'automatic' }],
|
|
25
|
+
'@babel/preset-typescript',
|
|
26
|
+
],
|
|
27
|
+
plugins: [
|
|
28
|
+
[
|
|
29
|
+
'babel-plugin-module-resolver',
|
|
30
|
+
{
|
|
31
|
+
alias: {
|
|
32
|
+
'@': isApp() ? './app' : './lib',
|
|
33
|
+
},
|
|
34
|
+
stripExtensions: [],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
['babel-plugin-styled-components', { displayName: true }],
|
|
38
|
+
['@babel/plugin-transform-runtime', { regenerator: true }],
|
|
39
|
+
'@babel/plugin-proposal-class-properties',
|
|
40
|
+
'@babel/plugin-syntax-dynamic-import',
|
|
41
|
+
'@babel/plugin-proposal-export-default-from',
|
|
42
|
+
'lodash',
|
|
43
|
+
'date-fns',
|
|
44
|
+
],
|
|
45
|
+
env: {
|
|
46
|
+
development: {
|
|
47
|
+
plugins: [
|
|
48
|
+
['babel-plugin-styled-components', { displayName: true }],
|
|
49
|
+
'@babel/plugin-transform-react-jsx-source',
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
production: {
|
|
53
|
+
plugins: [
|
|
54
|
+
['babel-plugin-styled-components', { displayName: false, pure: true }],
|
|
55
|
+
['transform-remove-console', { exclude: ['error', 'warn'] }],
|
|
56
|
+
'transform-react-remove-prop-types',
|
|
57
|
+
'@babel/plugin-transform-react-inline-elements',
|
|
58
|
+
'@babel/plugin-transform-react-constant-elements',
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
test: {
|
|
62
|
+
plugins: [
|
|
63
|
+
['babel-plugin-styled-components', { displayName: true }],
|
|
64
|
+
'@babel/plugin-transform-modules-commonjs',
|
|
65
|
+
'dynamic-import-node',
|
|
66
|
+
[
|
|
67
|
+
'babel-plugin-transform-strip-block',
|
|
68
|
+
{
|
|
69
|
+
requireDirective: true,
|
|
70
|
+
identifiers: [{ start: 'block:start', end: 'block:end' }],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
'babel-plugin-import-remove-resource-query',
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
if (
|
|
80
|
+
process.env.STORYBOOK_BUILD !== 'true' &&
|
|
81
|
+
process.env.TARGET_ENV !== 'node'
|
|
82
|
+
) {
|
|
83
|
+
config.env?.development?.plugins?.push?.('react-refresh/babel');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.babelConfig = config;
|
package/dist/esm/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
const { babelConfig } = require('./babel.config.cjs');
|
|
1
2
|
const { jestConfig } = require('./testing/jest.config.cjs');
|
|
2
3
|
const { jestNodeConfig } = require('./testing/jest.node.config.cjs');
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
6
|
+
babelConfig,
|
|
5
7
|
jestConfig,
|
|
6
8
|
jestNodeConfig,
|
|
7
9
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { babelConfig } from "./babel.config.
|
|
1
|
+
import { babelConfig } from "./babel.config.cjs";
|
|
2
2
|
import { config } from "./lint-config/eslint/config.js";
|
|
3
3
|
import { config as config2 } from "./lint-config/eslint/react.js";
|
|
4
4
|
import { stylelintConfig } from "./lint-config/stylelint.config.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { config as babelConfig };
|
|
2
|
+
declare namespace config {
|
|
2
3
|
let ignore: RegExp[];
|
|
3
4
|
let sourceType: string;
|
|
4
5
|
let presets: (string | (string | {
|
|
@@ -56,4 +57,4 @@ export namespace babelConfig {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
//# sourceMappingURL=babel.config.d.
|
|
60
|
+
//# sourceMappingURL=babel.config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babel.config.d.cts","sourceRoot":"","sources":["../../../lib/babel.config.cjs"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { babelConfig } from "./babel.config.cjs";
|
|
1
2
|
import { jestConfig } from "./testing/jest.config.cjs";
|
|
2
3
|
import { jestNodeConfig } from "./testing/jest.node.config.cjs";
|
|
3
|
-
export { jestConfig, jestNodeConfig };
|
|
4
|
+
export { babelConfig, jestConfig, jestNodeConfig };
|
|
4
5
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type LIB_NAME = 'pui-cli';
|
|
2
|
-
export { babelConfig } from './babel.config.
|
|
2
|
+
export { babelConfig } from './babel.config.cjs';
|
|
3
3
|
export { config as baseConfig } from './lint-config/eslint/config.js';
|
|
4
4
|
export { config as reactConfig } from './lint-config/eslint/react.js';
|
|
5
5
|
export { stylelintConfig } from './lint-config/stylelint.config.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC"}
|