-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ede05a6
commit a231941
Showing
12 changed files
with
243 additions
and
82 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
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,30 @@ | ||
import { Input } from '../../../commands'; | ||
import { Builder, Configuration } from '../../configuration'; | ||
import { getValueOrDefault } from './get-value-or-default'; | ||
|
||
/** | ||
* Returns the builder to use for the given application. | ||
* @param configuration Configuration object. | ||
* @param cmdOptions Command line options. | ||
* @param appName Application name. | ||
* @returns The builder to use. | ||
*/ | ||
export function getBuilder( | ||
configuration: Required<Configuration>, | ||
cmdOptions: Input[], | ||
appName: string, | ||
) { | ||
const builderValue = getValueOrDefault<Builder>( | ||
configuration, | ||
'compilerOptions.builder', | ||
appName, | ||
'builder', | ||
cmdOptions, | ||
'tsc', | ||
); | ||
return typeof builderValue === 'string' | ||
? { | ||
type: builderValue, | ||
} | ||
: builderValue; | ||
} |
Oops, something went wrong.