Skip to content

Commit

Permalink
Exit if not a vite project
Browse files Browse the repository at this point in the history
  • Loading branch information
tzsk committed Aug 19, 2022
1 parent 04e35de commit 1935c65
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ async function run() {
.map((file) => path.join(projectDirectory, file))
.filter((file) => fs.existsSync(file));

if (!viteFile) {
console.log(
chalk.red(
'\n🚨 No vite config file found. Please run this command in a Vite project.\n'
)
);
return;
}

const viteConfig = viteEslint(fs.readFileSync(viteFile, 'utf8'));
const installCommand = commandMap[packageManager];

Expand Down

0 comments on commit 1935c65

Please sign in to comment.