Skip to content

Commit

Permalink
Update spinner with the one from gluegun
Browse files Browse the repository at this point in the history
  • Loading branch information
maciekstosio committed Jun 16, 2024
1 parent 4cea61c commit e9e95da
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/recipies/lint.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { Toolbox } from 'gluegun/build/types/domain/toolbox'
import { confirm, spinner } from '@clack/prompts'
import { confirm } from '@clack/prompts'

const COMMAND = 'lint'

const execute = () => async (toolbox: Toolbox) => {
const packageJSON = toolbox.filesystem.read('package.json', 'json')

if (!packageJSON?.devDependencies?.eslint) {
const s = spinner()
const spinner = toolbox.print.spin('Installing ESLint...')

s.start('Installing ESLint...')
await toolbox.packageManager.add('eslint', { dev: true })
s.stop('Installed ESLint.')

spinner.stop()

toolbox.print.info('Installed ESLint.')
}

await toolbox.patching.update('package.json', (config) => {
Expand Down

0 comments on commit e9e95da

Please sign in to comment.