Skip to content

Commit

Permalink
Minor bug fix 🚧
Browse files Browse the repository at this point in the history
Fixed bug while fetching Nuxt-js Boilerplate template
  • Loading branch information
jamesgeorge007 committed Feb 24, 2019
1 parent 538fb3f commit cb62a95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/commands/initlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ let initfn = (appName) => {
const projectConfig = [
'{',
`"project_name": "${appName}",`,
`"Boilerplate": "${choice.template}"`,
`"template": "${choice.template}"`,
'}'
];

fs.writeFileSync('./mevn.json', projectConfig.join('\n').toString());
if (choice.template === 'Nuxt-js') {
choice.template = 'nuxt';
Expand Down
4 changes: 3 additions & 1 deletion lib/run/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ let clientfn = () => {
appData()
.then((data) => {
shell.cd(data.project_name);
shell.cd('client');
if (data.template !== 'Nuxt-js') {
shell.cd('client');
}
setupProject('npm run dev');
});
};
Expand Down
3 changes: 1 addition & 2 deletions lib/run/launch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ exports.setupProject = (launchCmd) => {
logUpdate(chalk.green.bold('\n Installing dependencies in the background. Hold on... ') + chalk.cyan.bold.dim(frame()));
}, 50);

cmd.get('npm install', (err, data) => {
cmd.get('npm install', (err) => {
clearInterval(spinner);
logUpdate.clear();
if(err) {
console.log(chalk.red.bold('Something went wrong. Couldn\'t install the required packages!'));
process.exit(1);
}
console.log(data);
console.log(chalk.green.bold('You\'re all set.'));
setTimeout(() => {
shell.exec(launchCmd);
Expand Down

0 comments on commit cb62a95

Please sign in to comment.