mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 14:14:10 +00:00
Add .env example and unlink script
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
a877a00934
commit
3636532bce
@ -0,0 +1 @@
|
||||
PORT=1337
|
||||
23
scripts/unlink.js
Normal file
23
scripts/unlink.js
Normal file
@ -0,0 +1,23 @@
|
||||
const { join } = require('path');
|
||||
const execa = require('execa');
|
||||
const fs = require('fs-extra');
|
||||
const { promisify } = require('util');
|
||||
const glob = promisify(require('glob').glob);
|
||||
|
||||
async function run() {
|
||||
const packageDirs = await glob('packages/*');
|
||||
|
||||
console.log('Unlinking all packages');
|
||||
|
||||
const packages = packageDirs.map(dir => ({
|
||||
dir,
|
||||
pkgJSON: fs.readJSONSync(join(dir, 'package.json')),
|
||||
}));
|
||||
|
||||
await Promise.all(packages.map(({ dir }) => execa('yarn', ['unlink'], { cwd: dir })));
|
||||
|
||||
const packageNames = packages.map(p => p.pkgJSON.name).join(' ');
|
||||
console.log(`Package names: \n ${packageNames}\n`);
|
||||
}
|
||||
|
||||
run().catch(err => console.error(err));
|
||||
Loading…
x
Reference in New Issue
Block a user