diff --git a/bin/helpers.js b/bin/helpers.js index e35be4a8..84879436 100644 --- a/bin/helpers.js +++ b/bin/helpers.js @@ -17,9 +17,13 @@ export const copyLightningFixtures = (config) => { exit(red(bold('The target directory ' + targetDir + ' already exists'))) } //this will be removed once ts support is added - fs.cpSync(path.join(path.join(config.fixturesBase, 'js'), 'default'), targetDir, {recursive: true}) - fs.cpSync(path.join(config.fixturesBase, 'common/public'), path.join(targetDir, 'public'), {recursive: true}) - + fs.cpSync(path.join(path.join(config.fixturesBase, 'js'), 'default'), targetDir, { + recursive: true, + }) + fs.cpSync(path.join(config.fixturesBase, 'common/public'), path.join(targetDir, 'public'), { + recursive: true, + }) + resolve(targetDir) }) } @@ -58,7 +62,9 @@ export const addESlint = (config) => { ) // Copy IDE stuff from fixture base - fs.cpSync(path.join(config.fixturesBase, 'common/ide'), path.join(config.targetDir), {recursive: true}) + fs.cpSync(path.join(config.fixturesBase, 'common/ide'), path.join(config.targetDir), { + recursive: true, + }) // Copy and merge fixture specific package.json const origPackageJson = JSON.parse(fs.readFileSync(path.join(config.targetDir, 'package.json'))) @@ -201,11 +207,14 @@ export const isValidPath = (path) => { } export const done = (config) => { - console.log('================================== ⚡️⚡️⚡️⚡️ ================================== ') - console.log('Your new boilerplate Lightning 3 App has been created!') + console.log('') + console.log('--------------------------------------------------------------------') + console.log(' Your new boilerplate Lightning 3 App has been created! ⚡️') + console.log('--------------------------------------------------------------------') + console.log('') + console.log('Follow the steps below to get started:') console.log('') console.log(` ${green(bold(`cd ${config.appFolder}`))}`) console.log(` ${green(bold('npm install'))}`) console.log(` ${green(bold('npm run dev'))}`) - console.log('================================== ⚡️⚡️⚡️⚡️ ================================== ') } diff --git a/bin/index.js b/bin/index.js index d051fa51..00095609 100755 --- a/bin/index.js +++ b/bin/index.js @@ -18,12 +18,11 @@ import { } from './helpers.js' const defaultBanner = ` ------------------------------------------------------------------- - Welcome to Blits - The App development framework for Lightning 3 ------------------------------------------------------------------- +-------------------------------------------------------------------- + Welcome to Blits - The App development framework for Lightning 3 ⚡️ +-------------------------------------------------------------------- - -Answer the questions below to set up a new App +Answer the questions below to set up a new Lightning 3 Blits App ` console.log(defaultBanner) @@ -39,7 +38,7 @@ const questions = [ { type: 'text', name: 'appName', - message: 'App name', + message: 'What is the name of your App?', format: val => { // Check if the provided application name is empty if (!val.trim()) { @@ -54,7 +53,7 @@ const questions = [ { type: 'text', name: 'appPackage', - message: 'Package Name', + message: 'What is the package name of your App?', format: val => { // Validate the package name using validate-npm-package-name if (!validatePackage(val).validForNewPackages) { @@ -69,7 +68,7 @@ const questions = [ { type: 'text', name: 'appFolder', - message: 'Specify the location for the app to be created', + message: 'In what folder (relative to the current location) should the App be generated?', format: (val, prev) => { // Regular expression to validate whether the path is Unix/Windows-based const pathRegex = /([A-Za-z]:)?([\\/]+\w+)+/ @@ -97,7 +96,7 @@ const questions = [ { type: 'toggle', name: 'esLint', - message: 'Enable eslint', + message: 'Do you want to enable eslint?', initial: 'true', active: 'Yes', inactive: 'No', @@ -105,7 +104,7 @@ const questions = [ { type: 'toggle', name: 'gitInit', - message: 'Enable gitInit', + message: 'Do you want to generate an git repository?', initial: 'true', active: 'Yes', inactive: 'No', @@ -126,7 +125,7 @@ const createApp = () => { return config }, () => { - spinnerMsg.start(`Creating Blits Lightning 3 App ${config.appName}`) + spinnerMsg.start(`Generating new App "${config.appName}" ...`) copyLightningFixtures(config).then(targetDir => (config.targetDir = targetDir)) spinnerMsg.succeed() },