Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Simplify CLI starters #6632

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/create-qwik/src/run-create-interactive-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export async function runCreateInteractiveCli(): Promise<CreateAppResult> {
throw new Error('Base app not found');
}

const starterApps = templateManager.templates.filter((a) => a.id !== baseApp.id);
// sorted alphabetically
const starterApps = templateManager.templates
.filter((a) => a.id !== baseApp.id)
.sort((a, b) => a.name.localeCompare(b.name));

const outDir: string = resolveRelativeDir(projectNameAnswer.trim());
baseApp.target = outDir;
Expand Down
3 changes: 1 addition & 2 deletions scripts/validate-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ async function validateCreateQwikCli() {
const tmpDir = join(__dirname, '..', 'dist-dev');

await Promise.all([
validateStarter(api, tmpDir, 'basic', true, `👻`),
validateStarter(api, tmpDir, 'playground', true, `👻`),
validateStarter(api, tmpDir, 'empty', true, `🫙`),
validateStarter(api, tmpDir, 'site-with-visual-cms', true, `😈`),
validateStarter(api, tmpDir, 'library', false, `📚`),
]).catch((e) => {
console.error(e);
Expand Down
2 changes: 1 addition & 1 deletion starters/apps/empty/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qwik-empty-starter",
"description": "App with Routing built-in ready to create your app",
"description": "Blank project with routing included",
"type": "module",
"__qwik__": {
"priority": 1,
Expand Down
4 changes: 2 additions & 2 deletions starters/apps/library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qwik-library-name",
"description": "Create a reusable Qwik component library",
"description": "Create a Qwik library",
"version": "0.0.1",
"private": false,
"main": "./lib/index.qwik.mjs",
Expand Down Expand Up @@ -48,7 +48,7 @@
"vite-tsconfig-paths": "^4.2.1"
},
"__qwik__": {
"displayName": "Component library (Qwik)",
"displayName": "Library (Qwik)",
"priority": -1,
"docs": [
"https://qwik.dev/docs/getting-started/"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "qwik-basic-starter",
"description": "Demo App with Routing built-in (recommended)",
"description": "Demo app with sample routes",
"type": "module",
"__qwik__": {
"priority": 2,
"displayName": "Basic App (Qwik City + Qwik)",
"displayName": "Playground App (Qwik City + Qwik)",
"qwikCity": true,
"docs": [
"https://qwik.dev/docs/getting-started/"
Expand Down
2 changes: 0 additions & 2 deletions starters/apps/site-with-visual-cms/.env

This file was deleted.

15 changes: 0 additions & 15 deletions starters/apps/site-with-visual-cms/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions starters/apps/site-with-visual-cms/package.json

This file was deleted.

1 change: 0 additions & 1 deletion starters/apps/site-with-visual-cms/public/favicon.svg

This file was deleted.

9 changes: 0 additions & 9 deletions starters/apps/site-with-visual-cms/public/manifest.json

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading