1 | const { join } = require('path');
|
2 | const { existsSync } = require('fs');
|
3 | const postonstallPath = join(__dirname, './dist/postinstall.js');
|
4 | const 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 |
|
15 | doing();
|