mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 11:54:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			572 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			572 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
'use strict';
 | 
						|
 | 
						|
const { join } = require('path');
 | 
						|
const { promisify } = require('util');
 | 
						|
const execa = require('execa');
 | 
						|
const fs = require('fs-extra');
 | 
						|
const glob = promisify(require('glob').glob);
 | 
						|
 | 
						|
async function run() {
 | 
						|
  const proc = await execa('yarn', ['workspaces', 'list', '--json', '--no-private'], {
 | 
						|
    cwd: join(__dirname, '..'),
 | 
						|
  });
 | 
						|
 | 
						|
  const packages = proc.stdout
 | 
						|
    .trim()
 | 
						|
    .split('\n')
 | 
						|
    .map((info) => JSON.parse(info).name);
 | 
						|
 | 
						|
  await execa('npx', ['yalc', 'link', ...packages], { stdio: 'inherit' });
 | 
						|
}
 | 
						|
 | 
						|
run().catch((err) => console.error(err));
 |