From 8711852ad6ce1d96ddef49f958946eb6128b0ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Wed, 6 Nov 2024 23:59:39 +0900 Subject: [PATCH] chore: add `babel.config.js` files to every package (#81) and update `build` script in `package.json` --- babel.config.js | 3 +++ packages/clang-format-git-python/babel.config.js | 3 +++ packages/clang-format-git-python/package.json | 2 +- packages/clang-format-node/babel.config.js | 3 +++ packages/clang-format-node/package.json | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 packages/clang-format-git-python/babel.config.js create mode 100644 packages/clang-format-node/babel.config.js diff --git a/babel.config.js b/babel.config.js index a79d119..340d33e 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,6 @@ module.exports = { presets: ['@babel/preset-env'], + ignore: ['**/*.test.js', '**/*.spec.js'], + minified: true, + comments: false, }; diff --git a/packages/clang-format-git-python/babel.config.js b/packages/clang-format-git-python/babel.config.js new file mode 100644 index 0000000..831adca --- /dev/null +++ b/packages/clang-format-git-python/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: '../../babel.config.js', +}; diff --git a/packages/clang-format-git-python/package.json b/packages/clang-format-git-python/package.json index 2a1e69a..f2c7c6d 100644 --- a/packages/clang-format-git-python/package.json +++ b/packages/clang-format-git-python/package.json @@ -46,7 +46,7 @@ "scripts": { "postinstall": "test -d src && npm run build || npm run chmod", "prepublishOnly": "npm run build", - "build": "npx babel src -d build --ignore **/*.test.js && npx tsc && cp -r src/script build && cp ../../LICENSE ../../README.md .", + "build": "npx babel src -d build && npx tsc && cp -r src/script build && cp ../../LICENSE ../../README.md .", "postbuild": "npm run chmod", "test": "node --test", "chmod": "find ./src/script ./build/script -type f -exec chmod 755 {} + || true" diff --git a/packages/clang-format-node/babel.config.js b/packages/clang-format-node/babel.config.js new file mode 100644 index 0000000..831adca --- /dev/null +++ b/packages/clang-format-node/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: '../../babel.config.js', +}; diff --git a/packages/clang-format-node/package.json b/packages/clang-format-node/package.json index efa7f6c..2f75f88 100644 --- a/packages/clang-format-node/package.json +++ b/packages/clang-format-node/package.json @@ -43,7 +43,7 @@ "scripts": { "postinstall": "test -d src && npm run build || npm run chmod", "prepublishOnly": "npm run build", - "build": "npx babel src -d build --ignore **/*.test.js && npx tsc && cp -r src/bin build && cp ../../LICENSE ../../README.md .", + "build": "npx babel src -d build && npx tsc && cp -r src/bin build && cp ../../LICENSE ../../README.md .", "postbuild": "npm run chmod", "test": "node --test", "chmod": "find ./src/bin ./build/bin -type f -exec chmod 755 {} + || true"