@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.
@@ -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;
@@ -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.js");
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;
@@ -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.js";
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 namespace babelConfig {
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.ts.map
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.js';
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,mBAAmB,CAAC;AAChD,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"}
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"}