$ yarn install- It's recommended to use Visual Studio Code editor and install the MDX extension for document writing
yarn dev: Start the local development server, file modifications will update in real-time. (Note: Left navigation bar related modifications require restarting the service)yarn build: Build production environment code, static files will be generated in thedistdirectory after build completionyarn serve: Preview the built static files locallyyarn up @alauda/doom: Upgrade doom
The AC CLI documentation in docs/en/ui/cli_tools/ac/ is generated from the AC repository and should be updated through the sync script instead of manual edits.
- Install project dependencies with
yarn install - Ensure
gitis available on your machine - Ensure your account has SSH access to
git@gitlab-ce.alauda.cn:alauda/ac.git
Run the standard update command from the repository root:
yarn update-ac-manualThis command runs:
node scripts/update-ac-manual.jsWhen you use yarn update-ac-manual, the repository sync pulls the release-1.0 branch from git@gitlab-ce.alauda.cn:alauda/ac.git by default.
The update script uses the following locations:
- Source repository:
git@gitlab-ce.alauda.cn:alauda/ac.git - Temporary clone directory:
local/temp-ac-clone - Source manual directory inside the AC repository:
manual/ - Target directory in this repository:
docs/en/ui/cli_tools/ac/
The workflow is:
- Clone the AC repository into
local/temp-ac-clone - Read the
manual/directory from the cloned repository - Remove all existing files under
docs/en/ui/cli_tools/ac/exceptindex.mdx - Copy the files from
manual/intodocs/en/ui/cli_tools/ac/ - Strip leading numeric prefixes from top-level Markdown filenames such as
01_foo.md - Remove the temporary clone directory after the sync finishes
If you need to sync from a branch other than release-1.0, pass the branch name as an argument:
yarn update-ac-manual <branch>This is equivalent to running the script directly:
node scripts/update-ac-manual.js <branch>Replace <branch> with the branch name you want to pull from.
If you run node scripts/update-ac-manual.js without a branch argument, the script defaults to release-1.0.
After updating the generated files, review and validate the result:
git diff -- docs/en/ui/cli_tools/ac
yarn lint
yarn buildIf the English source changes need to be synchronized to localized content, run:
yarn translate- Do not manually edit files in docs/en/ui/cli_tools/ac/; they are managed by the update script
index.mdxin docs/en/ui/cli_tools/ac/ is preserved by the sync process- If local preview output changes in the sidebar or navigation, restart
yarn dev