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

feat(node): add templates for nodejs frameworks #14231

Merged

Conversation

ndcunningham
Copy link
Contributor

Now that the ground work has been set for one framework. This PR adds template support for the remaining frameworks

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@ndcunningham ndcunningham requested a review from jaysoo January 9, 2023 15:53
@vercel
Copy link

vercel bot commented Jan 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Jan 9, 2023 at 8:29PM (UTC)

@nx-cloud
Copy link

nx-cloud bot commented Jan 9, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 27242e5. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


⌛ The following targets are in progress

✅ Successfully ran 8 targets

Sent with 💌 from NxCloud.

@ndcunningham ndcunningham force-pushed the feat/support-additional-nodejs-framework branch from 401a913 to d00da97 Compare January 9, 2023 18:00
// Prompt for bundler webpack / esbuild
if (schema.framework) {
// Prompt for bundler webpack / esbuild if framework is provided without '--bundler'
if (schema.framework && (!schema.bundler || schema.bundler === 'none')) {
Copy link
Member

Choose a reason for hiding this comment

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

As discussed, let's skip prompting the bundler and just use esbuild as the default. Users can read the generator options or our docs if they need to change it.

@@ -77,8 +77,7 @@
"bundler": {
"description": "Bundler which is used to package the application",
"type": "string",
"enum": ["esbuild", "webpack"],
"default": "esbuild"
"enum": ["esbuild", "webpack", "none"]
Copy link
Member

Choose a reason for hiding this comment

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

Let's add a default value for esbuild. I don't think we'll support "none" right now, but users can always use "bundle: false" with esbuild to transpile only.

const app = new koa();

app.use(async ctx =>{
ctx.body = 'Hello from Nrwl 🐳 API';
Copy link
Member

Choose a reason for hiding this comment

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

Minor: Let's print something like Hello API -- avoid Nrwl since we're trying to promote as "Nx".

I think we also want it in JSON to mimic an API. Like { "message": "Hello API" } or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍🏿

@ndcunningham ndcunningham force-pushed the feat/support-additional-nodejs-framework branch 3 times, most recently from 1e81777 to 238b3f7 Compare January 9, 2023 20:25
@ndcunningham ndcunningham requested a review from jaysoo January 9, 2023 20:26
Now that the ground work has been set for one framework. This PR adds template support for the
remaining frameworks
@ndcunningham ndcunningham force-pushed the feat/support-additional-nodejs-framework branch from 238b3f7 to 27242e5 Compare January 9, 2023 20:29
@jaysoo jaysoo merged commit 6fb0631 into nrwl:master Jan 10, 2023
@ndcunningham ndcunningham deleted the feat/support-additional-nodejs-framework branch January 10, 2023 15:57
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants