Skip to content

Commit

Permalink
style: format code with Prettier
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 63e7b81 according to the output
from Prettier.

Details: #18
  • Loading branch information
deepsource-autofix[bot] authored Feb 8, 2024
1 parent 63e7b81 commit 56aceec
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions public/scripts/postinstall.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import fs from 'fs'
import { exec } from 'child_process'
import Spinnies from 'spinnies'

;(async function main () {
;(async function main() {
const tasks = ['tsc --build ./tsconfig.build.json']

if (!fs.existsSync('tsconfig.build.json')) {
tasks.unshift(...[
'ts-patch install -s',
'lerna run compile --concurrency 2 --parallel --include-dependencies --scope=@dumlj/tidy-cli',
'dumlj concurrently "tscfg --exclude "**/__template__" --exclude "**/__example__"" "deps --exclude "**/__template__" --exclude "**/__example__""',
'npm run compile',
// must compile create-cli
'dumlj install husky',
])
tasks.unshift(
...[
'ts-patch install -s',
'lerna run compile --concurrency 2 --parallel --include-dependencies --scope=@dumlj/tidy-cli',
'dumlj concurrently "tscfg --exclude "**/__template__" --exclude "**/__example__"" "deps --exclude "**/__template__" --exclude "**/__example__""',
'npm run compile',
// must compile create-cli
'dumlj install husky',
]
)
}

const spinnies = new Spinnies()
Expand All @@ -27,19 +28,19 @@ import Spinnies from 'spinnies'
stdio: 'inherit',
env: {
...process.env,
FORCE_COLOR: true
}
FORCE_COLOR: true,
},
})

cp.stdout.pipe(process.stdout)
cp.stderr.pipe(process.stderr)
cp.on('exit', (code) => code ? reject(code) : resolve())
cp.on('exit', (code) => (code ? reject(code) : resolve()))
})
} catch (error) {
spinnies.stopAll('fail')
return
}

spinnies.succeed(command)
}
})()

0 comments on commit 56aceec

Please sign in to comment.