Skip to content

feat: add ember to vite create #20069

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NullVoxPopuli
Copy link

Description

Ember uses Vite now, and here I've added the underlying project generating commands to vite create

This is a much smaller change than: #19564 (which adds whole template projects)

@NullVoxPopuli NullVoxPopuli changed the title Add ember to vite create feat: add ember to vite create May 20, 2025
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review May 29, 2025 21:45
variants: [
{
name: 'ember app',
display: 'Production-ready App',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display value ends with the "up-right" arrow to signal that it is calling an external cli

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like, the emoji? ↗️ ?

display: 'Production and OSS ready Library',
color: redBright,
customCommand:
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm --typescript',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-TypeScript library variant (line 270) includes the --typescript flag in its command, which contradicts its purpose. Please remove the --typescript flag from this command to correctly represent the non-TypeScript version:

'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm'
Suggested change
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm --typescript',
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm',

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do I tell the bot that I want to keep TS?

display: 'Production-ready App',
color: redBright,
customCommand:
'npx ember-cli@latest new TARGET_DIR --blueprint @ember/app-blueprint --pnpm --lang en',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--pnpm and --lang en are opinionated choices, does ember-cli come with an interactive mode that allows users to pick them? or maybe investigate reusing the detected package manager from create-vite cli

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does have an interactive mode, ya , tho --lang isn't required.

r maybe investigate reusing the detected package manager from create-vite cli

oh, how do you do that? that sounds cool

display: 'Production and OSS ready Library',
color: redBright,
customCommand:
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm --typescript',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do ember libraries leverage vite during their build process? (vite library mode?) create-vite is primarily used for creating applications using vite, i don't think we have explicit library support for any other option

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea, we use vite for testing, we boot up an in-memory app which can be used for tests, the library's docs, etc

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
display: 'Production and OSS ready Library',
color: redBright,
customCommand:
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm --typescript',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be an inconsistency in the ember-library variant configuration. The non-TypeScript variant currently includes the --typescript flag in its command:

npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm --typescript

This should be modified to remove the TypeScript flag for the non-TypeScript variant:

npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm

This will ensure proper differentiation between the TypeScript and non-TypeScript library variants.

Suggested change
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm --typescript',
'npx ember-cli@latest addon TARGET_DIR --blueprint @ember/addon-blueprint --pnpm',

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@@ -100,7 +102,7 @@ $ deno init --npm vite my-vue-app --template vue

:::

See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each supported template: `vanilla`, `vanilla-ts`, `vue`, `vue-ts`, `react`, `react-ts`, `react-swc`, `react-swc-ts`, `preact`, `preact-ts`, `lit`, `lit-ts`, `svelte`, `svelte-ts`, `solid`, `solid-ts`, `qwik`, `qwik-ts`.
See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each supported template: `vanilla`, `vanilla-ts`, `vue`, `vue-ts`, `react`, `react-ts`, `react-swc`, `react-swc-ts`, `preact`, `preact-ts`, `lit`, `lit-ts`, `svelte`, `svelte-ts`, `ember`, `ember-ts`, `solid`, `solid-ts`, `qwik`, `qwik-ts`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template names in the documentation need to be updated to match the actual implementation. Currently it shows ember and ember-ts, but the code defines four distinct templates: ember-app, ember-app-ts, ember-library, and ember-library-ts. Please update the documentation to list all four template options for accuracy and to avoid confusion for users.

Suggested change
See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each supported template: `vanilla`, `vanilla-ts`, `vue`, `vue-ts`, `react`, `react-ts`, `react-swc`, `react-swc-ts`, `preact`, `preact-ts`, `lit`, `lit-ts`, `svelte`, `svelte-ts`, `ember`, `ember-ts`, `solid`, `solid-ts`, `qwik`, `qwik-ts`.
See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) for more details on each supported template: `vanilla`, `vanilla-ts`, `vue`, `vue-ts`, `react`, `react-ts`, `react-swc`, `react-swc-ts`, `preact`, `preact-ts`, `lit`, `lit-ts`, `svelte`, `svelte-ts`, `ember-app`, `ember-app-ts`, `ember-library`, `ember-library-ts`, `solid`, `solid-ts`, `qwik`, `qwik-ts`.

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants