diff --git a/packages/@moonreach/nodepack/src/commands/build.js b/packages/@moonreach/nodepack/src/commands/build.js index 7e25524..854b32b 100644 --- a/packages/@moonreach/nodepack/src/commands/build.js +++ b/packages/@moonreach/nodepack/src/commands/build.js @@ -1,6 +1,6 @@ /** @typedef {import('../lib/PackPlugin.js').PackPluginApply} PackPluginApply */ -const { info, error, done } = require('@moonreach/nodepack-utils') +const { info, error, done, log, chalk } = require('@moonreach/nodepack-utils') /** @type {PackPluginApply} */ module.exports = (api, options) => { @@ -8,7 +8,7 @@ module.exports = (api, options) => { description: 'Build the app for production', usage: 'nodepack build [entry]', }, async (args) => { - info('Preparing production pack...') + info(chalk.blue('Preparing production pack...')) if (args._ && typeof args._[0] === 'string') { options.entry = args._[0] @@ -31,7 +31,8 @@ module.exports = (api, options) => { return reject(`Build failed with errors.`) } - done('Build complete! Your app is ready for production.') + done(chalk.green('Build complete! Your app is ready for production.')) + log(chalk.dim(api.resolve(webpackConfig.output.path))) resolve() } } diff --git a/packages/@moonreach/nodepack/src/commands/dev.js b/packages/@moonreach/nodepack/src/commands/dev.js index d897be1..d7bf593 100644 --- a/packages/@moonreach/nodepack/src/commands/dev.js +++ b/packages/@moonreach/nodepack/src/commands/dev.js @@ -1,7 +1,7 @@ /** @typedef {import('../lib/PackPlugin.js').PackPluginApply} PackPluginApply */ const path = require('path') -const { info, error } = require('@moonreach/nodepack-utils') +const { info, error, chalk } = require('@moonreach/nodepack-utils') /** @type {PackPluginApply} */ module.exports = (api, options) => { @@ -9,7 +9,7 @@ module.exports = (api, options) => { description: 'Build and live-reload the app', usage: 'nodepack dev [entry]', }, async (args) => { - info('Preparing development pack...') + info(chalk.blue('Preparing development pack...')) if (args._ && typeof args._[0] === 'string') { options.entry = args._[0] @@ -39,9 +39,9 @@ module.exports = (api, options) => { if (child) { child.kill() - info('App restarting') + info(chalk.blue('App restarting...')) } else { - info('App starting') + info(chalk.blue('App starting...')) } const file = api.resolve(path.join(webpackConfig.output.path, webpackConfig.output.filename))