本文整理汇总了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()
}