mirror of https://github.com/abpframework/abp
Merge pull request #1552 from abpframework/feature/build-script-ng
Feature/build script ngpull/1557/head
commit
dfa8f6919a
@ -1,6 +0,0 @@
|
||||
{
|
||||
"version": "0.7.5",
|
||||
"packages": ["packages/*"],
|
||||
"npmClient": "yarn",
|
||||
"lerna": "2.11.0"
|
||||
}
|
@ -1 +1,38 @@
|
||||
// ESM syntax is supported.
|
||||
import execa from 'execa';
|
||||
import fse from 'fs-extra';
|
||||
|
||||
(async () => {
|
||||
const { projects } = await fse.readJSON('../angular.json');
|
||||
const projectNames = Object.keys(projects);
|
||||
|
||||
const packageJson = await fse.readJSON('../package.json');
|
||||
|
||||
let npmPackageNames = [];
|
||||
projectNames.forEach(project => {
|
||||
// do not convert to async
|
||||
const { name, dependencies = {}, peerDependencies = {} } = fse.readJSONSync(`../packages/${project}/package.json`);
|
||||
npmPackageNames.push(name);
|
||||
|
||||
packageJson.devDependencies = { ...packageJson.devDependencies, ...dependencies, ...peerDependencies };
|
||||
});
|
||||
|
||||
await fse.writeJSON('../package.json', packageJson, { spaces: 2 });
|
||||
|
||||
try {
|
||||
await execa('yarn', {
|
||||
stdout: 'inherit',
|
||||
cwd: '..',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error.stderr);
|
||||
}
|
||||
|
||||
npmPackageNames.forEach(name => {
|
||||
// do not convert to async
|
||||
execa.sync('yarn', ['symlink', 'copy', '--angular', '--packages', name, '--no-watch'], {
|
||||
stdout: 'inherit',
|
||||
cwd: '../',
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
Loading…
Reference in new issue