@allohamora/cli
Advanced tools
Comparing version 1.12.0 to 1.13.0
@@ -162,10 +162,5 @@ #!/usr/bin/env node | ||
const ADD_HOOK_PLACEHOLDER = 'placeholder'; | ||
const addHook = async (name, script) => { | ||
const huskyPath = path.join(HOOK_DIR, name); | ||
await spawnCommand('npx', [PACKAGE_NAME$6, 'add', huskyPath, ADD_HOOK_PLACEHOLDER]); | ||
const fileWithPlaceholder = await fsp.readFile(huskyPath, { encoding: 'utf-8' }); | ||
const fileWithScript = fileWithPlaceholder.replace(ADD_HOOK_PLACEHOLDER, script); | ||
const filePath = path.join(ROOT_PATH, huskyPath); | ||
await fsp.writeFile(filePath, fileWithScript, { encoding: 'utf-8' }); | ||
const hookPath = path.join(ROOT_PATH, HOOK_DIR, name); | ||
await fsp.writeFile(hookPath, script, { encoding: 'utf-8' }); | ||
}; | ||
@@ -378,3 +373,3 @@ const isHuskyInstalled = isInstalledAndInRootCheck(PACKAGE_NAME$6, HOOK_DIR); | ||
await installDevelopmentDependencies(PACKAGE_NAME$6); | ||
await addScripts({ name: 'prepare', script: `${PACKAGE_NAME$6} install` }); | ||
await addScripts({ name: 'prepare', script: PACKAGE_NAME$6 }); | ||
await runScript('prepare'); | ||
@@ -1085,3 +1080,3 @@ }; | ||
const kebablizeKey = kebablize(key); | ||
spinner.text = `${kebablizeKey} is installing`; | ||
spinner.text = `${kebablizeKey} is installing\n`; | ||
return options[key](); | ||
@@ -1088,0 +1083,0 @@ }); |
{ | ||
"name": "@allohamora/cli", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"description": "cli to initialize projects and more", | ||
@@ -14,3 +14,3 @@ "input": "./src/index.ts", | ||
"start": "npm unlink @allohamora/cli && npm link @allohamora/cli && ./bin/cli.js", | ||
"prepare": "husky install", | ||
"prepare": "husky", | ||
"format": "prettier . --check", | ||
@@ -69,3 +69,3 @@ "format:fix": "prettier --write .", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"husky": "^8.0.3", | ||
"husky": "^9.0.11", | ||
"jest": "^29.5.0", | ||
@@ -72,0 +72,0 @@ "lint-staged": "^13.2.1", |
Sorry, the diff of this file is not supported yet
121122
991