(commandOptions: CommandOptions)
| 4 | import {CommandOptions} from '../types'; |
| 5 | |
| 6 | export async function command(commandOptions: CommandOptions) { |
| 7 | const {config, lockfile} = commandOptions; |
| 8 | logger.info(colors.yellow('! preparing your project...')); |
| 9 | if (config.packageOptions.source === 'remote') { |
| 10 | if (!config.packageOptions.types) { |
| 11 | logger.info( |
| 12 | colors.green('✔') + |
| 13 | ' nothing to prepare. ' + |
| 14 | colors.dim( |
| 15 | '(if using TypeScript, set `packageOptions.types=true` to fetch package TypeScript types ahead-of-time.)', |
| 16 | ), |
| 17 | ); |
| 18 | return; |
| 19 | } |
| 20 | if (!lockfile) { |
| 21 | logger.info( |
| 22 | colors.yellow( |
| 23 | '! no dependencies found. run "snowpack add [package]" to add a dependencies to your project.', |
| 24 | ), |
| 25 | ); |
| 26 | return; |
| 27 | } |
| 28 | } |
| 29 | const pkgSource = getPackageSource(config); |
| 30 | await pkgSource.prepare(); |
| 31 | logger.info(colors.green('✔') + ' project ready!'); |
| 32 | } |
nothing calls this directly
no test coverage detected