Skip to content

Commit

Permalink
Changed text of some questions.
Browse files Browse the repository at this point in the history
  • Loading branch information
michielvandergeest committed Feb 2, 2024
1 parent e8e4249 commit fa5e917
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
23 changes: 16 additions & 7 deletions bin/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down Expand Up @@ -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')))
Expand Down Expand Up @@ -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('================================== ⚡️⚡️⚡️⚡️ ================================== ')
}
21 changes: 10 additions & 11 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()) {
Expand All @@ -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) {
Expand All @@ -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+)+/
Expand Down Expand Up @@ -97,15 +96,15 @@ const questions = [
{
type: 'toggle',
name: 'esLint',
message: 'Enable eslint',
message: 'Do you want to enable eslint?',
initial: 'true',
active: 'Yes',
inactive: 'No',
},
{
type: 'toggle',
name: 'gitInit',
message: 'Enable gitInit',
message: 'Do you want to generate an git repository?',
initial: 'true',
active: 'Yes',
inactive: 'No',
Expand All @@ -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()
},
Expand Down

0 comments on commit fa5e917

Please sign in to comment.