@aurodesignsystem-dev/auro-cli 0.0.0-pr309.0 → 0.0.0-pr310.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +136 -35
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,60 +1,161 @@
1
1
  # Auro CLI
2
2
 
3
- Auro CLI is a command-line interface designed to help consumers of the Auro Design System and the developers maintaining it.
3
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-cli/test-and-release.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-cli/actions/workflows/test-and-release.yml)
4
+ [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-cli.svg?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-cli)
5
+ [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-cli.svg?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
4
6
 
5
- ## `Dev` Command Features
7
+ A CLI tool for the Auro Design System. It runs the local dev server, syncs repo config, builds components and docs, and drives parts of the release pipeline.
6
8
 
7
- - **Start Development Server**: Quickly launch a web development server with default or custom configurations.
8
- - **Customizable Options**: Specify the port and the directory to open when the server starts.
9
- - **Hot Module Replacement**: Integrates with HMR (Hot Module Replacement) for a better development experience.
10
- - **Graceful Error Handling**: Handles invalid inputs and missing options gracefully.
9
+ Published as `@aurodesignsystem/auro-cli`.
11
10
 
12
- ## Table of Contents
11
+ ## Install
13
12
 
14
- - [Installation](#installation)
15
- - [Usage](#usage)
16
- - [Commands](#commands)
17
- - [Options](#options)
18
- - [Examples](#examples)
19
-
20
- ## Installation
13
+ ```bash
14
+ npm install @aurodesignsystem/auro-cli
15
+ ```
21
16
 
22
- To install Auro CLI, clone the repository and install the dependencies:
17
+ Or run a single command without installing:
23
18
 
24
19
  ```bash
25
- npm install @aurodesignsystem/auro-cli
20
+ npx --package=@aurodesignsystem/auro-cli auro <command>
26
21
  ```
27
22
 
28
- ## Usage
23
+ ## Commands
24
+
25
+ Run `auro <command> --help` for options on any command. Defaults are shown where they exist.
26
+
27
+ ### At a glance
28
+
29
+ **Development**
30
+
31
+ | Command | Does |
32
+ |---------|------|
33
+ | `auro dev` | Runs the dev server for a component. |
34
+ | `auro build` | Builds a component. |
35
+ | `auro docs` | Generates API docs from the Custom Elements Manifest. |
36
+ | `auro test` | Runs the web test runner. |
37
+
38
+ **Repo maintenance**
39
+
40
+ | Command | Does |
41
+ |---------|------|
42
+ | `auro sync` | Pulls `.github/` config from auro-templates. |
43
+ | `auro migrate` | Runs a migration script by id. |
44
+ | `auro agent` | Interactive cross-repo migration runner (work in progress). |
45
+ | `auro ado` | Creates an ADO work item from a GitHub issue. |
46
+
47
+ **Release pipeline** (CI runs these)
48
+
49
+ | Command | Does |
50
+ |---------|------|
51
+ | `auro rc-workflow` | Cuts the RC branch and opens the RC PR. |
52
+ | `auro pr-release` | Sets the PR preview version in `package.json`. |
53
+ | `auro check-commits` (alias `auro cc`) | Classifies commits and can label the PR. |
54
+
55
+ ## Full reference
56
+
57
+ ### Development
58
+
59
+ #### `auro dev`
60
+
61
+ Runs the dev server for a component. Builds first, then serves.
62
+
63
+ - `-s, --serve`: start a server.
64
+ - `-p, --port <number>`: server port.
65
+ - `-o, --open`: open the browser once the server is up.
66
+ - `-w, --watch`: rebuild on change.
67
+ - `-m, --module-paths [paths...]`: path(s) to a node_modules folder.
68
+ - `--skip-docs`: skip doc generation (default: off).
69
+ - `-r, --readme-template <url>`: URL to the README template.
70
+ - `--wca-input [files...]`: source file(s) to analyze for API docs.
71
+ - `--wca-output [files...]`: output file(s) for API docs.
72
+
73
+ #### `auro build`
74
+
75
+ Builds a component.
76
+
77
+ - `-m, --module-paths [paths...]`: path(s) to a node_modules folder.
78
+ - `-w, --watch`: rebuild on change.
79
+ - `--skip-docs`: skip doc generation (default: off).
80
+ - `-r, --readme-template <url>`: URL to the README template.
81
+ - `--wca-input [files...]`: source file(s) to analyze for API docs.
82
+ - `--wca-output [files...]`: output file(s) for API docs.
83
+
84
+ #### `auro docs`
29
85
 
30
- To use Auro CLI, run the following command in your terminal:
86
+ Generates API documentation from the Custom Elements Manifest.
87
+
88
+ - `-c, --cem`: generate the Custom Elements Manifest (default: off).
89
+ - `-a, --api`: create `api.md` from the CEM (default: off).
90
+ - `-w, --watch`: rebuild docs on change (default: off).
91
+ - `-r, --readme-template <url>`: URL to the README template.
92
+ - `--skip-readme`: skip README.md processing (default: off).
93
+ - `-s, --serve`: start a server.
94
+ - `-p, --port <number>`: server port.
95
+ - `-o, --open`: open the browser once the server is up.
96
+
97
+ #### `auro test`
98
+
99
+ Runs the web test runner against the component library.
100
+
101
+ - `-w, --watch`: watch mode.
102
+ - `-c, --coverage-report`: generate a coverage report.
103
+ - `-o, --open`: open the coverage report in the browser.
104
+ - `-f, --files <glob>`: test files glob pattern.
31
105
 
32
106
  ```bash
33
- auro dev
107
+ auro test --coverage-report --open
34
108
  ```
35
109
 
36
- This will start the development server with default options.
110
+ ### Repo maintenance
37
111
 
38
- ## Commands
112
+ #### `auro sync`
39
113
 
40
- `auro dev`
41
- Runs the web development server.
114
+ Pulls `.github/` config from auro-templates and rewrites this repo's copy.
42
115
 
43
- #### Options
116
+ - `-r, --ref <branch/tag/commit>`: git ref to pull from (default: `main`).
117
+ - `-t, --template <name>`: which template to use (default: `default`).
44
118
 
45
- - `-o, --open <type>` Open the server to a specific directory (default: demo/).
46
- - `-p, --port <type>` Change the server port (default: undefined).
119
+ Heads up: after it validates the template, it removes the whole `.github/` folder and rebuilds it. Any local `.github/` file not in the template is lost. It does not make a branch, so changes land on your current branch. Run it on a branch you are willing to change.
47
120
 
48
- #### Examples
121
+ #### `auro migrate`
49
122
 
50
- Start the server on a specific port:
123
+ Runs a codemod-style migration script by id.
51
124
 
52
- ```
53
- auro dev --port 8000
54
- ```
125
+ - `-i, --id <string>` (required): the migration to run.
126
+ - `-m, --multi-gitter`: run it across every repo in the multi-gitter config.
55
127
 
56
- Open the server to a specific directory:
128
+ #### `auro agent`
57
129
 
58
- ```
59
- auro dev --open src/
60
- ```
130
+ Interactive. Runs a migration across Auro components in dependency order. It prompts for the migration id and which components to start from. Needs multi-gitter installed. (Work in progress)
131
+
132
+ #### `auro ado`
133
+
134
+ Creates an Azure DevOps work item from a GitHub issue.
135
+
136
+ - `-g, --gh-issue <issue>`: the GitHub issue to use.
137
+
138
+ ### Release pipeline
139
+
140
+ CI runs these. You do not usually run them by hand. The workflows in auro-actions call them.
141
+
142
+ #### `auro rc-workflow`
143
+
144
+ Cuts the release-candidate branch and opens the RC pull request. Runs on a push to dev. No options.
145
+
146
+ #### `auro pr-release`
147
+
148
+ Sets the PR preview version in `package.json`, computed from the npm registry. Does not publish.
149
+
150
+ - `-n, --namespace <namespace>`: package namespace (default: `@aurodesignsystem-dev`).
151
+ - `-p, --pr-number <number>`: the PR number (default: `0`).
152
+
153
+ The version comes out as `0.0.0-pr<PR#>.<n>`, where `<n>` is the next free increment on npm.
154
+
155
+ #### `auro check-commits` (alias `auro cc`)
156
+
157
+ Reads the repo's commits, classifies each by conventional-commit type, and reports the result.
158
+
159
+ - `-l, --set-label`: label the PR by the highest-priority commit type.
160
+ - `-d, --debug`: print detailed commit info.
161
+ - `-r, --release-notes`: generate release notes from the commits.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-cli",
3
- "version": "0.0.0-pr309.0",
3
+ "version": "0.0.0-pr310.0",
4
4
  "description": "A cli tool to support the Auro Design System",
5
5
  "repository": {
6
6
  "type": "git",