angular/adev/scripts/update-cross-repo-docs/index.mjs
Alan Agius 6f870cead2 ci: refactor cross-repo documentation update scripts (#64792)
Consolidate separate scripts for updating Aria, CDK, and CLI documentation into a single, unified  script. This change streamlines the documentation update process and improves maintainability. The workflow file has been updated to use the new consolidated script.

PR Close #64792
2025-10-30 19:19:20 +00:00

41 lines
1.1 KiB
JavaScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import {execSync} from 'node:child_process';
import {join} from 'node:path';
import {updateAssets} from './update-assets.mjs';
async function main() {
await updateAssets({
repo: 'angular/aria-builds',
assetsPath: '_adev_assets',
destPath: join(import.meta.dirname, '../../src/content/aria'),
});
await updateAssets({
repo: 'angular/cdk-builds',
assetsPath: '_adev_assets',
destPath: join(import.meta.dirname, '../../src/content/cdk'),
});
await updateAssets({
repo: 'angular/cli-builds',
assetsPath: 'help',
destPath: join(import.meta.dirname, '../../src/content/cli/help'),
});
console.log('\n-----------------------------------------------');
console.log('Change list');
console.log('-----------------------------------------------\n');
execSync(`git status --porcelain`, {stdio: 'inherit'});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});