Skip to content

Commit

Permalink
Merge pull request #37 from teloscube/36-upgrade-dependencies
Browse files Browse the repository at this point in the history
36 upgrade dependencies
  • Loading branch information
alioguzhan authored Sep 18, 2024
2 parents b055c5b + bd2694f commit a0ece94
Show file tree
Hide file tree
Showing 14 changed files with 492 additions and 372 deletions.
18 changes: 8 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const major = parseInt(semver[0], 10);
if (major < SUPPORTED_NODE_VERSION) {
console.error(
'You are running Node ' +
currentNodeVersion +
'.\n' +
`Create DECAF Webapp requires Node ${SUPPORTED_NODE_VERSION} or higher. \n` +
'Please update your version of Node.'
currentNodeVersion +
'.\n' +
`Create DECAF Webapp requires Node ${SUPPORTED_NODE_VERSION} or higher. \n` +
'Please update your version of Node.'
);
process.exit(1);
}
Expand Down Expand Up @@ -132,18 +132,16 @@ spawn.sync('git', ['init'], { cwd: projectDir, stdio: 'inherit' });
console.log(chalk.blueBright('Installing dependencies. This might take a while.'));
spawn.sync(packager, ['install'], { cwd: projectDir, stdio: 'inherit' });

spawn.sync('npx', ['husky', 'add', '.husky/pre-commit', 'npx lint-staged'], { cwd: projectDir, stdio: 'inherit' });
spawn.sync('npx', ['husky', 'add', '.husky/commit-msg', 'npx commitlint --edit $1'], {
cwd: projectDir,
stdio: 'inherit',
});
spawn.sync('npx', ['husky', 'init'], { cwd: projectDir, stdio: 'inherit' });
spawn.sync('echo "npx lint-staged" > .husky/pre-commit', { cwd: projectDir, stdio: 'inherit', shell: true });
spawn.sync('echo "npx commitlint --edit $1" > .husky/commit-msg', { cwd: projectDir, stdio: 'inherit', shell: true });

console.log();
console.log(chalk.greenBright('Success! 🎉'));
console.log();
console.log(chalk.greenBright('Your new DECAF app is ready.'));
console.log(chalk.green(`Created ${chalk.greenBright(projectNameHuman)} at ${chalk.gray(projectDir)}`));
console.log();
console.log(chalk.greenBright(`$ cd ${folderName} && ${packager} start`));
console.log(chalk.greenBright(`$ cd ${folderName} && ${packager} run dev`));
console.log();
console.log(chalk.dim(`Done in ${(Date.now() - _timer) / 1000} seconds.`));
Loading

0 comments on commit a0ece94

Please sign in to comment.