[ci] yarn format

This commit is contained in:
matthewp 2021-06-08 15:12:07 +00:00 committed by GitHub Actions
parent 6bca7c83a7
commit a7594cfcdf
3 changed files with 85 additions and 83 deletions

View file

@ -17,7 +17,6 @@ export function mkdirp(dir: string) {
} }
} }
const { version } = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8')); const { version } = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));
export async function main() { export async function main() {
@ -34,7 +33,7 @@ export async function main() {
type: 'confirm', type: 'confirm',
name: 'forceOverwrite', name: 'forceOverwrite',
message: 'Directory not empty. Continue?', message: 'Directory not empty. Continue?',
initial: false initial: false,
}); });
if (!response.forceOverwrite) { if (!response.forceOverwrite) {
process.exit(1); process.exit(1);
@ -44,14 +43,14 @@ export async function main() {
mkdirp(cwd); mkdirp(cwd);
} }
const options = /** @type {import('./types/internal').Options} */ (await prompts([ const options = /** @type {import('./types/internal').Options} */ await prompts([
{ {
type: 'select', type: 'select',
name: 'template', name: 'template',
message: 'Which app template would you like to use?', message: 'Which app template would you like to use?',
choices: TEMPLATES choices: TEMPLATES,
}, },
])); ]);
const emitter = degit(`snowpackjs/astro/examples/${options.template}`, { const emitter = degit(`snowpackjs/astro/examples/${options.template}`, {
cache: false, cache: false,

View file

@ -1,16 +1,19 @@
export const TEMPLATES = [, export const TEMPLATES = [
,
{ {
title: 'Starter Kit (Generic)', title: 'Starter Kit (Generic)',
value: 'starter' value: 'starter',
}, { },
{
title: 'Blog', title: 'Blog',
value: 'blog' value: 'blog',
}, },
{ {
title: 'Documentation', title: 'Documentation',
value: 'docs' value: 'docs',
}, },
{ {
title: 'Portfolio', title: 'Portfolio',
value: 'portfolio' value: 'portfolio',
}]; },
];