Skip to content

Commit

Permalink
fix: πŸ› onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
xsahxl committed Feb 28, 2022
1 parent 3e34041 commit f940fc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/init/init-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ export class InitManager {

const appPath = await loadApplication({ registry, target: './', source: name, name: projectName });
if (appPath) {
// postInit
try {
if (process.env[`${appPath}-post-init`]) {
const tempObj = JSON.parse(process.env[`${appPath}-post-init`]);
const baseChildComponent = await require(path.join(tempObj['tempPath'], 'hook'));
await baseChildComponent.postInit(tempObj);
}
} catch (e) {}
logger.success(`\n${emoji('πŸ„β€')} Thanks for using Serverless-Devs`);
console.log(`${emoji('πŸ‘‰')} You could [cd ${appPath}] and enjoy your serverless journey!`);
console.log(`${emoji('🧭️')} If you need help for this example, you can use [s -h] after you enter folder.`);
Expand Down
4 changes: 2 additions & 2 deletions src/onboarding/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { InitManager } from '../init/init-manager';
import { i18n } from '../utils';
import { emoji, red } from '../utils/common';
import core from '../utils/core';
const { colors, inquirer, fse: fs } = core;
const { colors, inquirer, fse: fs, getTemplatePath } = core;

async function onboarding() {
const { templateFile } = process.env;
const templateFile = await getTemplatePath();
if (fs.existsSync(templateFile)) {
return await projectWithDevs();
}
Expand Down

0 comments on commit f940fc3

Please sign in to comment.