本文整理匯總了TypeScript中signale.success函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript success函數的具體用法?TypeScript success怎麽用?TypeScript success使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了success函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: buildChrome
compiler.run((err, stats) => {
console.log(stats.toString(tasks.WEBPACK_STATS_OPTIONS))
if (stats.hasErrors()) {
signale.error('Webpack compilation error')
process.exit(1)
return
}
signale.success('Webpack compilation done')
buildChrome()
buildFirefox()
tasks.copyPhabricator()
signale.success('Build done')
})
示例2: printFileSizesAfterBuild
const onSuccess = (
dist: string,
{ stats, previousFileSizes, warnings }: any
) => {
if (warnings.length) {
logger.warn('Compiled with warnings.\n')
logger.warn(warnings.join('\n\n'))
logger.warn(
'\nSearch for the ' +
chalk.underline(chalk.yellow('keywords')) +
' to learn more about each warning.'
)
logger.warn(
'To ignore, add ' +
chalk.cyan('// eslint-disable-next-line') +
' to the line before.\n'
)
} else {
logger.success(chalk.green('Compiled successfully.\n'))
}
logger.log('File sizes after gzip:\n')
printFileSizesAfterBuild(
stats,
previousFileSizes,
dist,
WARN_AFTER_BUNDLE_GZIP_SIZE,
WARN_AFTER_CHUNK_GZIP_SIZE
)
logger.log()
}
示例3: copyAssets
export function copyAssets(env: BuildEnv): void {
signale.await('Copy assets')
const dir = 'build/dist'
shelljs.rm('-rf', dir)
shelljs.mkdir('-p', dir)
shelljs.cp('-R', 'src/extension/assets/*', dir)
shelljs.cp('-R', 'src/extension/views/*', dir)
signale.success('Assets copied')
}
示例4: return
return () => {
signale.await(`Building the ${title} ${env} bundle`)
copyDist(buildDir)
const zipDest = path.resolve(process.cwd(), `${BUILDS_DIR}/bundles/${browserBundleZips[browser]}`)
if (zipDest) {
shelljs.mkdir('-p', `./${BUILDS_DIR}/bundles`)
shelljs.exec(`cd ${buildDir} && zip -q -r ${zipDest} *`)
}
signale.success(`Done building the ${title} ${env} bundle`)
}
示例5: buildChrome
(err, stats) => {
console.log(stats.toString(tasks.WEBPACK_STATS_OPTIONS))
if (stats.hasErrors()) {
signale.error('Webpack compilation error')
return
}
signale.success('Webpack compilation done')
buildChrome()
buildFirefox()
tasks.copyPhabricator()
triggerReload()
}