-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added Husky configuration for Yarn
- Loading branch information
1 parent
85330b0
commit 01cfac0
Showing
7 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Third-Party libraries | ||
import inquirer from 'inquirer' | ||
|
||
// NodeJS | ||
import process from 'node:process' | ||
|
||
// Utils | ||
import { writeMessage } from './console' | ||
import { getErrorMessage } from './errors' | ||
|
||
export async function shouldPublishToNPM(): Promise<boolean> { | ||
try { | ||
const { shouldPublishToNPM } = await inquirer.prompt({ | ||
type: 'confirm', | ||
default: false, | ||
name: 'shouldPublishToNPM', | ||
message: 'Will you publish it on npm?:' | ||
}) | ||
|
||
return shouldPublishToNPM | ||
} catch { | ||
writeMessage({ | ||
type: 'error', | ||
message: getErrorMessage('PublishConfirmation') | ||
}) | ||
process.exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters