Skip to content

Commit f8f023c

Browse files
committed
add support for guides
1 parent 45f29d7 commit f8f023c

File tree

7 files changed

+1263
-0
lines changed

7 files changed

+1263
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules/
2+
.eslintcache

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

.prettierrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
singleQuote: true,
3+
};

cli.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env node
2+
import { program } from 'commander';
3+
import { readFile } from 'fs/promises';
4+
import { dirname } from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import { join } from 'path';
7+
8+
const pkg = JSON.parse(
9+
await readFile(join(dirname(fileURLToPath(import.meta.url)), 'package.json')),
10+
);
11+
12+
import guides from './projects/guides.js';
13+
14+
program
15+
.name(pkg.name)
16+
.description(pkg.description)
17+
.version(pkg.version)
18+
.option(
19+
'--dry-run',
20+
'Run the deploy pipeline without actually deploying. Useful for understanding all the necessary steps, or when working on the pipeline itself',
21+
);
22+
23+
program
24+
.command('guides')
25+
.description('Deploy the new version for https://guides.emberjs.com')
26+
.action((args, commandOptions) =>
27+
guides(args, {
28+
...program.opts(),
29+
...commandOptions,
30+
}),
31+
);
32+
33+
program.parse();

eslint.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
4+
/** @type {import('eslint').Linter.Config[]} */
5+
export default [
6+
{ languageOptions: { globals: globals.node } },
7+
pluginJs.configs.recommended,
8+
];

0 commit comments

Comments
 (0)