mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
fix: Husky automatic installation (#16206)
Co-authored-by: Nicolò Ribaudo <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Nicolò Ribaudo
parent
570fc1bfed
commit
19a10bca10
@@ -410,10 +410,11 @@ jobs:
|
||||
- name: Support self-references on old Node.js
|
||||
run: |
|
||||
echo '{
|
||||
"type": "commonjs",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@babel/runtime": "workspace:*",
|
||||
"@babel/runtime-corejs3": "workspace:*"
|
||||
"@babel/runtime": "workspace:^",
|
||||
"@babel/runtime-corejs3": "workspace:^"
|
||||
}
|
||||
}' > packages/package.json
|
||||
node -e "
|
||||
|
||||
@@ -6,6 +6,8 @@ conditions:
|
||||
USE_ESM:
|
||||
default: false
|
||||
|
||||
enableConstraintsChecks: true
|
||||
|
||||
enableGlobalCache: true
|
||||
|
||||
# Disable hardened mode. The Hardened mode will be run in the prepare-yarn-cache CI job.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"prepare": "is-ci || husky install",
|
||||
"postinstall": "node scripts/postinstall.js",
|
||||
"bootstrap": "make bootstrap",
|
||||
"codesandbox:build": "make build-no-bundle",
|
||||
"build": "make build",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { existsSync, copyFileSync } from "fs";
|
||||
import isCI from "is-ci";
|
||||
import husky from "husky";
|
||||
|
||||
if (!isCI) {
|
||||
if (!existsSync(".husky/_/husky.sh")) {
|
||||
husky.install();
|
||||
}
|
||||
|
||||
if (!existsSync(".vscode/settings.json")) {
|
||||
copyFileSync(".vscode/settings.example.json", ".vscode/settings.json");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user