Skip to content

Commit d634931

Browse files
authored
Merge pull request #1 from ember-learn/initial-version
add support for guides
2 parents 45f29d7 + fd894cf commit d634931

File tree

8 files changed

+1291
-0
lines changed

8 files changed

+1291
-0
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request: {}
9+
10+
concurrency:
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
lint:
16+
name: 'Lint'
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 18
26+
cache: pnpm
27+
- run: pnpm i --frozen-lockfile
28+
- run: pnpm run lint

.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)