Skip to content

Commit

Permalink
Update docs & remove typescript references
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOtterlord committed Sep 28, 2024
1 parent e80dfb8 commit 61cf83b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
26 changes: 13 additions & 13 deletions packages/create-astro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ npm create astro@latest my-astro-project -- --template cassidoo/shopify-react-as

May be provided in place of prompts

| Name | Description |
| :--------------------------- | :----------------------------------------------------- |
| `--help` (`-h`) | Display available flags. |
| `--template <name>` | Specify your template. |
| `--install` / `--no-install` | Install dependencies (or not). |
| `--git` / `--no-git` | Initialize git repo (or not). |
| `--yes` (`-y`) | Skip all prompts by accepting defaults. |
| `--no` (`-n`) | Skip all prompts by declining defaults. |
| `--dry-run` | Walk through steps without executing. |
| `--skip-houston` | Skip Houston animation. |
| `--ref` | Specify an Astro branch (default: latest). |
| `--fancy` | Enable full Unicode support for Windows. |
| `--typescript <option>` | TypeScript option: `strict` / `strictest` / `relaxed`. |
| Name | Description |
| :--------------------------- | :----------------------------------------- |
| `--help` (`-h`) | Display available flags. |
| `--template <name>` | Specify your template. |
| `--install` / `--no-install` | Install dependencies (or not). |
| `--add <integrations>` | Add integrations. |
| `--git` / `--no-git` | Initialize git repo (or not). |
| `--yes` (`-y`) | Skip all prompts by accepting defaults. |
| `--no` (`-n`) | Skip all prompts by declining defaults. |
| `--dry-run` | Walk through steps without executing. |
| `--skip-houston` | Skip Houston animation. |
| `--ref` | Specify an Astro branch (default: latest). |
| `--fancy` | Enable full Unicode support for Windows. |

[examples]: https://github.com/withastro/astro/tree/main/examples
[typescript]: https://github.com/withastro/astro/tree/main/packages/astro/tsconfigs
6 changes: 1 addition & 5 deletions packages/create-astro/src/actions/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export async function getContext(argv: string[]): Promise<Context> {
'--no-install': Boolean,
'--git': Boolean,
'--no-git': Boolean,
'--typescript': String,
'--skip-houston': Boolean,
'--dry-run': Boolean,
'--help': Boolean,
Expand All @@ -69,7 +68,6 @@ export async function getContext(argv: string[]): Promise<Context> {
'--no-install': noInstall,
'--git': git,
'--no-git': noGit,
'--typescript': typescript,
'--fancy': fancy,
'--skip-houston': skipHouston,
'--dry-run': dryRun,
Expand All @@ -82,12 +80,11 @@ export async function getContext(argv: string[]): Promise<Context> {
yes = false;
if (install == undefined) install = false;
if (git == undefined) git = false;
if (typescript == undefined) typescript = 'strict';
}

skipHouston =
((os.platform() === 'win32' && !fancy) || skipHouston) ??
[yes, no, install, git, typescript].some((v) => v !== undefined);
[yes, no, install, git].some((v) => v !== undefined);

const { messages, hats, ties } = getSeasonalData({ fancy });

Expand All @@ -110,7 +107,6 @@ export async function getContext(argv: string[]): Promise<Context> {
yes,
install: install ?? (noInstall ? false : undefined),
git: git ?? (noGit ? false : undefined),
typescript,
cwd,
exit(code) {
process.exit(code);
Expand Down
1 change: 0 additions & 1 deletion packages/create-astro/src/actions/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function help() {
['--skip-houston', 'Skip Houston animation.'],
['--ref', 'Choose astro branch (default: latest).'],
['--fancy', 'Enable full Unicode support for Windows.'],
['--typescript <option>', 'TypeScript option: strict | strictest | relaxed.'],
],
},
});
Expand Down
10 changes: 5 additions & 5 deletions packages/create-astro/test/context.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ describe('context', () => {
assert.deepEqual(ctx.install, true);
});

it('add', async () => {
const ctx = await getContext(['--add', 'node']);
assert.deepEqual(ctx.add, ['node']);
});

it('no install', async () => {
const ctx = await getContext(['--no-install']);
assert.deepEqual(ctx.install, false);
Expand All @@ -65,9 +70,4 @@ describe('context', () => {
const ctx = await getContext(['--no-git']);
assert.deepEqual(ctx.git, false);
});

it('typescript', async () => {
const ctx = await getContext(['--typescript', 'strict']);
assert.deepEqual(ctx.typescript, 'strict');
});
});

0 comments on commit 61cf83b

Please sign in to comment.