@willbooster/babel-configs 1.0.0 → 1.0.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/README.md CHANGED
@@ -1,3 +1,55 @@
1
1
  # babel-config
2
2
 
3
3
  A set of babel config files for my repositories.
4
+
5
+ ## How to add dependencies for babel.config.cjs
6
+
7
+ ```sh
8
+ yarn add -D @willbooster/babel-configs \
9
+ @babel/core \
10
+ @babel/plugin-proposal-class-properties \
11
+ @babel/plugin-proposal-numeric-separator \
12
+ @babel/preset-env \
13
+ @babel/preset-typescript \
14
+ babel-plugin-transform-remove-console
15
+ ```
16
+
17
+ ## How to add dependencies for babel.corejs.config.cjs
18
+
19
+ ```sh
20
+ yarn add -D @willbooster/babel-configs \
21
+ @babel/core \
22
+ @babel/plugin-proposal-class-properties \
23
+ @babel/plugin-proposal-numeric-separator \
24
+ @babel/preset-env \
25
+ @babel/preset-typescript \
26
+ babel-plugin-transform-remove-console \
27
+ core-js
28
+ ```
29
+
30
+ ## How to add dependencies for babel.react.config.cjs
31
+
32
+ ```sh
33
+ yarn add -D @willbooster/babel-configs \
34
+ @babel/core \
35
+ @babel/plugin-proposal-class-properties \
36
+ @babel/plugin-proposal-numeric-separator \
37
+ @babel/preset-env \
38
+ @babel/preset-react \
39
+ @babel/preset-typescript \
40
+ babel-plugin-transform-remove-console
41
+ ```
42
+
43
+ ## How to add dependencies for babel.corejs.react.config.cjs
44
+
45
+ ```sh
46
+ yarn add -D @willbooster/babel-configs \
47
+ @babel/core \
48
+ @babel/plugin-proposal-class-properties \
49
+ @babel/plugin-proposal-numeric-separator \
50
+ @babel/preset-env \
51
+ @babel/preset-react \
52
+ @babel/preset-typescript \
53
+ babel-plugin-transform-remove-console \
54
+ core-js
55
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/babel-configs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A set of babel configs for WillBooster projects",
5
5
  "license": "Apache-2.0",
6
6
  "author": "WillBooster Inc.",
@@ -16,7 +16,7 @@
16
16
  "devDependencies": {
17
17
  "@types/babel__core": "7.1.19",
18
18
  "@willbooster/prettier-config": "9.1.0",
19
- "core-js": "3.25.0",
19
+ "core-js": "3.25.1",
20
20
  "lint-staged": "13.0.3",
21
21
  "prettier": "2.7.1",
22
22
  "sort-package-json": "1.57.0"
package/babel.config.js DELETED
@@ -1,45 +0,0 @@
1
- /** @type {import('@babel/core').TransformOptions} */
2
- const config = {
3
- presets: [
4
- [
5
- '@babel/preset-env',
6
- {
7
- bugfixes: true,
8
- },
9
- ],
10
- '@babel/typescript',
11
- ],
12
- plugins: ['@babel/proposal-class-properties', '@babel/proposal-numeric-separator'],
13
- env: {
14
- production: {
15
- plugins: [
16
- [
17
- 'transform-remove-console',
18
- {
19
- exclude: ['error', 'info', 'warn'],
20
- },
21
- ],
22
- ],
23
- },
24
- test: {
25
- plugins: [
26
- [
27
- 'transform-remove-console',
28
- {
29
- exclude: ['error', 'info', 'warn', 'debug'],
30
- },
31
- ],
32
- ],
33
- presets: [
34
- [
35
- '@babel/preset-env',
36
- {
37
- modules: 'auto',
38
- },
39
- ],
40
- ],
41
- },
42
- },
43
- };
44
-
45
- module.exports = config;
@@ -1,11 +0,0 @@
1
- const config = require('./babel.config.js');
2
-
3
- const packageJson = require('./package.json');
4
- const [major, minor] = packageJson.devDependencies['core-js'].split('.');
5
-
6
- /** @type {import('@babel/core').PluginItem} */
7
- const presetEnvConfig = config.presets[0][1];
8
- presetEnvConfig.useBuiltIns = 'usage';
9
- presetEnvConfig.corejs = `${major}.${minor}`;
10
-
11
- module.exports = config;
@@ -1,9 +0,0 @@
1
- const config = require('./babel.corejs.config.js');
2
- config.presets.push('@babel/preset-react');
3
-
4
- /** @type {import('@babel/core').PluginItem} */
5
- const presetEnvConfig = config.presets[0][1];
6
- presetEnvConfig.targets = { esmodules: true };
7
- presetEnvConfig.modules = false;
8
-
9
- module.exports = config;
@@ -1,9 +0,0 @@
1
- const config = require('./babel.config.js');
2
- config.presets.push('@babel/preset-react');
3
-
4
- /** @type {import('@babel/core').PluginItem} */
5
- const presetEnvConfig = config.presets[0][1];
6
- presetEnvConfig.targets = { esmodules: true };
7
- presetEnvConfig.modules = false;
8
-
9
- module.exports = config;