UNPKG

383 BJavaScriptView Raw
1const { join } = require('path');
2const { existsSync } = require('fs');
3const postonstallPath = join(__dirname, './dist/postinstall.js');
4const doing = async () => {
5 if (!process.env.INIT_CWD) {
6 return;
7 }
8 if (!existsSync(postonstallPath)) {
9 return;
10 }
11 const postInstallMod = require(postonstallPath);
12 postInstallMod.postinstall(process.env.INIT_CWD);
13};
14
15doing();