Skip to content

Commit

Permalink
Merge pull request #1 from ember-learn/initial-version
Browse files Browse the repository at this point in the history
add support for guides
  • Loading branch information
mansona authored Dec 10, 2024
2 parents 45f29d7 + fd894cf commit d634931
Show file tree
Hide file tree
Showing 8 changed files with 1,291 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: 'Lint'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm run lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
.eslintcache
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
singleQuote: true,
};
33 changes: 33 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env node
import { program } from 'commander';
import { readFile } from 'fs/promises';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { join } from 'path';

const pkg = JSON.parse(
await readFile(join(dirname(fileURLToPath(import.meta.url)), 'package.json')),
);

import guides from './projects/guides.js';

program
.name(pkg.name)
.description(pkg.description)
.version(pkg.version)
.option(
'--dry-run',
'Run the deploy pipeline without actually deploying. Useful for understanding all the necessary steps, or when working on the pipeline itself',
);

program
.command('guides')
.description('Deploy the new version for https://guides.emberjs.com')
.action((args, commandOptions) =>
guides(args, {
...program.opts(),
...commandOptions,
}),
);

program.parse();
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import globals from 'globals';
import pluginJs from '@eslint/js';

/** @type {import('eslint').Linter.Config[]} */
export default [
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
];
Loading

0 comments on commit d634931

Please sign in to comment.