create-three-blocks-starter 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +18 -0
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -204,6 +204,24 @@ async function main() {
|
|
|
204
204
|
},
|
|
205
205
|
});
|
|
206
206
|
|
|
207
|
+
{
|
|
208
|
+
const coreSpec = `@three-blocks/core@${channel === 'stable' ? 'latest' : channel}`;
|
|
209
|
+
console.log(`> Installing ${coreSpec} ...`);
|
|
210
|
+
const addArgs = hasPnpm ? ['add', '--save-exact', coreSpec] : ['install', '--save-exact', coreSpec];
|
|
211
|
+
const r = spawnSync(hasPnpm ? 'pnpm' : 'npm', addArgs, {
|
|
212
|
+
stdio: 'inherit',
|
|
213
|
+
cwd: targetDir,
|
|
214
|
+
env: {
|
|
215
|
+
...process.env,
|
|
216
|
+
THREE_BLOCKS_SECRET_KEY: license,
|
|
217
|
+
THREE_BLOCKS_CHANNEL: channel,
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
if (r.status !== 0) {
|
|
221
|
+
console.log(`${yellow('⚠')} Warning: could not install @three-blocks/core (exit ${r.status}).`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
207
225
|
// 6) Cleanup temp dir
|
|
208
226
|
try { fs.rmSync(tmp, { recursive: true, force: true }); } catch {}
|
|
209
227
|
|