diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:43:05 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 22:18:30 +0800 |
| commit | 89e95b3f143682ed9a006991bacf45c9dcba4818 (patch) | |
| tree | 4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/vuepress/lib/webpack/DevLogPlugin.js | |
| parent | aa7f0199255277949790b41c56e8ec97dd4f0da4 (diff) | |
| download | xmake-docs-89e95b3f143682ed9a006991bacf45c9dcba4818.tar.gz xmake-docs-89e95b3f143682ed9a006991bacf45c9dcba4818.zip | |
remove node_modulesvuepress
Diffstat (limited to 'node_modules/vuepress/lib/webpack/DevLogPlugin.js')
| -rw-r--r-- | node_modules/vuepress/lib/webpack/DevLogPlugin.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/node_modules/vuepress/lib/webpack/DevLogPlugin.js b/node_modules/vuepress/lib/webpack/DevLogPlugin.js deleted file mode 100644 index 8fd18d4a..00000000 --- a/node_modules/vuepress/lib/webpack/DevLogPlugin.js +++ /dev/null @@ -1,38 +0,0 @@ -const chalk = require('chalk') -const logger = require('../util/logger') - -module.exports = class DevLogPlugin { - constructor (options) { - this.options = options - } - - apply (compiler) { - let isFirst = true - compiler.hooks.done.tap('vuepress-log', stats => { - clearScreen() - - const { displayHost, port, publicPath } = this.options - const time = new Date().toTimeString().match(/^[\d:]+/)[0] - const displayUrl = `http://${displayHost}:${port}${publicPath}` - - logger.success( - `\n${chalk.gray(`[${time}]`)} Build ${chalk.italic(stats.hash.slice(0, 6))} ` + - `finished in ${stats.endTime - stats.startTime} ms! ` + - ( - isFirst - ? '' - : `${chalk.gray(`(${displayUrl})`)}` - ) - ) - if (isFirst) { - isFirst = false - console.log(`\n${chalk.gray('>')} VuePress dev server listening at ${chalk.cyan(displayUrl)}`) - } - }) - compiler.hooks.invalid.tap('vuepress-log', clearScreen) - } -} - -function clearScreen () { - process.stdout.write('\x1Bc') -} |
