scaffold-doc-cli 1.0.2 → 1.0.4
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.
- package/.github/workflows/ai-doc-sync.yml +3 -2
- package/index.js +11 -2
- package/package.json +1 -1
|
@@ -21,10 +21,10 @@ jobs:
|
|
|
21
21
|
- name: Setup Node.js
|
|
22
22
|
uses: actions/setup-node@v3
|
|
23
23
|
with:
|
|
24
|
-
node-version: '
|
|
24
|
+
node-version: '22'
|
|
25
25
|
|
|
26
26
|
- name: Install Dependencies
|
|
27
|
-
run: npm install @google/genai
|
|
27
|
+
run: npm install @google/genai --no-save
|
|
28
28
|
|
|
29
29
|
- name: Run AI Doc Sync
|
|
30
30
|
env:
|
|
@@ -44,3 +44,4 @@ jobs:
|
|
|
44
44
|
branch: ai-docs/${{ github.ref_name }}
|
|
45
45
|
base: ${{ github.head_ref || github.ref_name }}
|
|
46
46
|
delete-branch: true
|
|
47
|
+
add-paths: .docs
|
package/index.js
CHANGED
|
@@ -8,6 +8,14 @@ import { fileURLToPath } from 'url';
|
|
|
8
8
|
|
|
9
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
|
|
11
|
+
// Handle version check
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
if (args.includes('-v') || args.includes('--version')) {
|
|
14
|
+
const packageJson = await fs.readJson(path.join(__dirname, 'package.json'));
|
|
15
|
+
console.log(packageJson.version);
|
|
16
|
+
process.exit(0);
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
async function init() {
|
|
12
20
|
console.log(chalk.green.bold('Welcome to the Motin Documentation Initializer! 🚀'));
|
|
13
21
|
|
|
@@ -170,10 +178,10 @@ jobs:
|
|
|
170
178
|
- name: Setup Node.js
|
|
171
179
|
uses: actions/setup-node@v3
|
|
172
180
|
with:
|
|
173
|
-
node-version: '
|
|
181
|
+
node-version: '22'
|
|
174
182
|
|
|
175
183
|
- name: Install Dependencies
|
|
176
|
-
run: npm install @google/genai
|
|
184
|
+
run: npm install @google/genai --no-save
|
|
177
185
|
|
|
178
186
|
- name: Run AI Doc Sync
|
|
179
187
|
env:
|
|
@@ -193,6 +201,7 @@ jobs:
|
|
|
193
201
|
branch: ai-docs/\${{ github.ref_name }}
|
|
194
202
|
base: \${{ github.head_ref || github.ref_name }}
|
|
195
203
|
delete-branch: true
|
|
204
|
+
add-paths: .docs
|
|
196
205
|
`;
|
|
197
206
|
await fs.writeFile(path.join(workflowDir, 'ai-doc-sync.yml'), workflowContent);
|
|
198
207
|
console.log(chalk.green('✔ .github/workflows/ai-doc-sync.yml created'));
|