@@ -2,11 +2,11 @@ import fs from 'node:fs'
22
33import meow from 'meow'
44
5- import type { CliSubcommand } from '../../utils/meow-with-subcommands'
65import { scala } from './scala.ts'
76
8- const description =
9- 'Auto-detect build and attempt to generate manifest file'
7+ import type { CliSubcommand } from '../../utils/meow-with-subcommands'
8+
9+ const description = 'Auto-detect build and attempt to generate manifest file'
1010
1111const help = ( name : string ) => `
1212 Usage
@@ -23,14 +23,14 @@ export const auto: CliSubcommand = {
2323 description,
2424 async run ( argv , importMeta , { parentName } ) {
2525 // Allow `--verbose` to pass through
26- let verbose = false ;
26+ let verbose = false
2727 const args = argv . filter ( arg => {
2828 if ( arg === '--verbose' ) {
29- verbose = true ;
30- return false ;
29+ verbose = true
30+ return false
3131 }
32- return true ;
33- } ) ;
32+ return true
33+ } )
3434
3535 const name = `${ parentName } auto`
3636 if ( args . length ) {
@@ -42,18 +42,21 @@ export const auto: CliSubcommand = {
4242 } )
4343 }
4444
45- const subArgs = [ ] ;
46- if ( verbose ) subArgs . push ( '--verbose' , '1' ) ;
47- const scalaDir = '.' ;
45+ const subArgs = [ ]
46+ if ( verbose ) subArgs . push ( '--verbose' , '1' )
47+ const scalaDir = '.'
4848 if ( fs . existsSync ( scalaDir ) ) {
49- console . log ( 'Detected a Scala sbt build, running default Scala generator...' )
49+ console . log (
50+ 'Detected a Scala sbt build, running default Scala generator...'
51+ )
5052 subArgs . push ( scalaDir )
51- await scala . run ( subArgs , importMeta , { parentName} )
52- return ;
53+ await scala . run ( subArgs , importMeta , { parentName } )
54+ return
5355 }
5456
5557 // Show new help screen and exit
56- meow ( `
58+ meow (
59+ `
5760 $ ${ name }
5861
5962 Unfortunately this script did not discover a supported language in the
@@ -64,11 +67,12 @@ export const auto: CliSubcommand = {
6467 - Make sure the necessary build tools are available (\`PATH\`)
6568
6669 If that doesn't work, see \`${ name } <lang> --help\` for config details
67- ` , {
68- argv : [ '--help' ] ,
69- description,
70- importMeta
71- } )
70+ ` ,
71+ {
72+ argv : [ '--help' ] ,
73+ description,
74+ importMeta
75+ }
76+ )
7277 }
7378}
74-
0 commit comments