Revert "integrate @umbraco-cms/element and @umbraco-cms/context-api due to circular dependencies"
This reverts commit e87439ff5f.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
import fs from 'fs';
|
||||
import path, { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
const currDir = dirname(fileURLToPath(import.meta.url));
|
||||
const libsDir = path.resolve(currDir, '../libs');
|
||||
|
||||
fs.readdirSync(libsDir).forEach((lib) => {
|
||||
|
||||
// Run `npm run build` for each lib
|
||||
const libDir = path.resolve(libsDir, lib);
|
||||
const packageJsonPath = path.resolve(libDir, 'package.json');
|
||||
|
||||
if (!fs.existsSync(packageJsonPath)) return;
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath));
|
||||
if (packageJson.scripts && packageJson.scripts.build) {
|
||||
console.log(`Building ${lib}...`);
|
||||
execSync(`cd ${libDir} && npm run build`);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user