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(add): move templates to separate files and add new ones #379

Merged
merged 16 commits into from
Jan 7, 2025

Conversation

DamianGlowala
Copy link
Member

@DamianGlowala DamianGlowala commented Mar 29, 2024

related: #57

Splits each template into a separate file for ease of readability and maintenance. Adds templates for app, error, server middleware, and more.

@DamianGlowala DamianGlowala requested a review from pi0 April 2, 2024 08:18
@danielroe
Copy link
Member

@DamianGlowala any chance you could rebase this PR? 🙏

@DamianGlowala DamianGlowala removed the request for review from pi0 January 6, 2025 18:49
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Bundle Stats

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
54 → 56 5.66 MB → 5.67 MB (+3.1 kB) +0.05%
Changeset
File Δ Size
src/commands/build-module.ts 🆕 +1.33 kB 0 B → 1.33 kB
src/utils/templates/index.ts 🆕 +504 B 0 B → 504 B
src/utils/templates/app.ts 🆕 +407 B 0 B → 407 B
src/utils/templates/api.ts 🆕 +401 B 0 B → 401 B
src/utils/templates/error.ts 🆕 +394 B 0 B → 394 B
src/utils/templates/composable.ts 🆕 +343 B 0 B → 343 B
src/utils/templates/component.ts 🆕 +325 B 0 B → 325 B
src/utils/templates/layout.ts 🆕 +274 B 0 B → 274 B
src/utils/templates/module.ts 🆕 +259 B 0 B → 259 B
src/utils/templates/page.ts 🆕 +255 B 0 B → 255 B
src/utils/templates/plugin.ts 🆕 +245 B 0 B → 245 B
src/utils/templates/middleware.ts 🆕 +244 B 0 B → 244 B
src/utils/templates/server-route.ts 🆕 +225 B 0 B → 225 B
src/utils/templates/server-middleware.ts 🆕 +209 B 0 B → 209 B
src/utils/templates/server-plugin.ts 🆕 +204 B 0 B → 204 B
src/utils/templates/server-util.ts 🆕 +191 B 0 B → 191 B
src/utils/templates/layer.ts 🆕 +187 B 0 B → 187 B
src/utils/templates/app-config.ts 🆕 +150 B 0 B → 150 B
src/commands/index.ts 📈 +112 B (+9.48%) 1.15 kB → 1.26 kB
src/commands/add.ts 📈 +164 B (+8.54%) 1.88 kB → 2.04 kB
src/main.ts 📉 -575 B (-51.39%) 1.09 kB → 544 B
src/utils/templates.ts 🔥 -2.64 kB (-100%) 2.64 kB → 0 B
View detailed bundle breakdown

Added

Asset File Size % Changed
shared/nuxi.vClchuwn.mjs 0 B → 77.12 kB (+77.12 kB) -
shared/nuxi.BO0BBfd3.mjs 0 B → 17.69 kB (+17.69 kB) -
shared/nuxi.BgENdoyd.mjs 0 B → 1.76 kB (+1.76 kB) -
chunks/build-module.mjs 0 B → 1.33 kB (+1.33 kB) -
shared/nuxi.CVt1GvGe.mjs 0 B → 1.11 kB (+1.11 kB) -
shared/nuxi.DpekDEZq.mjs 0 B → 1.04 kB (+1.04 kB) -
shared/nuxi.CZkFAOfB.mjs 0 B → 804 B (+804 B) -
shared/nuxi.onla3I0R.mjs 0 B → 294 B (+294 B) -

Removed

Asset File Size % Changed
shared/nuxi.CMubMVZj.mjs 78.61 kB → 0 B (-78.61 kB) -100%
shared/nuxi.5KG_sQ_H.mjs 17.69 kB → 0 B (-17.69 kB) -100%
shared/nuxi.khUN-O-W.mjs 1.76 kB → 0 B (-1.76 kB) -100%
shared/nuxi.Dp_R8WEe.mjs 1.11 kB → 0 B (-1.11 kB) -100%
shared/nuxi.CsFpgg26.mjs 804 B → 0 B (-804 B) -100%
shared/nuxi.Bi12JVNs.mjs 294 B → 0 B (-294 B) -100%

Bigger

Asset File Size % Changed
chunks/add.mjs 4.51 kB → 6.74 kB (+2.22 kB) +49.28%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
index.mjs 188 B 0%
chunks/prompt.mjs 46.05 kB 0%
chunks/analyze.mjs 3.18 kB 0%
chunks/build.mjs 1.97 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 1.75 kB 0%
chunks/dev.mjs 9.58 kB 0%
chunks/devtools.mjs 736 B 0%
chunks/generate.mjs 388 B 0%
chunks/info.mjs 4.39 kB 0%
chunks/init.mjs 803.88 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 2.81 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.58 kB 0%
chunks/upgrade.mjs 5.69 kB 0%
chunks/satisfies.mjs 116 B 0%
chunks/main.mjs 15.34 kB 0%
chunks/index2.mjs 909.09 kB 0%
chunks/dev2.mjs 68.95 kB 0%
chunks/index3.mjs 17.11 kB 0%
chunks/xdg-open.mjs 25.32 kB 0%
chunks/node.mjs 134.34 kB 0%
chunks/index4.mjs 1.24 kB 0%
chunks/index5.mjs 6.55 kB 0%
chunks/index6.mjs 70.29 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/add2.mjs 10.6 kB 0%
chunks/search.mjs 42.99 kB 0%
chunks/index7.mjs 5.87 kB 0%
chunks/index8.mjs 882.9 kB 0%
chunks/multipart-parser2.mjs 4.58 kB 0%
shared/nuxi.DdI-vRyV.mjs 1.54 kB 0%
shared/nuxi.BSm0_9Hr.mjs 107 B 0%
shared/nuxi.BTNtCwAV.mjs 1.34 kB 0%
shared/nuxi.D1V6iren.mjs 20.07 kB 0%
shared/nuxi.C5KDh4qT.mjs 14.64 kB 0%
shared/nuxi.BbDL64qi.mjs 8.04 kB 0%
shared/nuxi.oF0sJJb9.mjs 2.02 MB 0%
shared/nuxi.BHLUJ6h2.mjs 5.12 kB 0%
shared/nuxi.E-ZsRS8r.mjs 943 B 0%
shared/nuxi.BrE13ZGm.mjs 152.11 kB 0%
shared/nuxi.CQKunj3-.mjs 285.08 kB 0%
shared/nuxi.ChFrgAY-.mjs 5.71 kB 0%
shared/nuxi.BZI8rqcO.mjs 6.13 kB 0%
shared/nuxi.BPuj-7ta.mjs 42.89 kB 0%

@DamianGlowala DamianGlowala changed the title feat(add): add and restructure templates feat(add): move templates to separate files and add new ones Jan 6, 2025
Copy link

pkg-pr-new bot commented Jan 6, 2025

Open in Stackblitznuxt-cli-playground

npm i https://pkg.pr.new/nuxi@379

commit: bc4938d

@DamianGlowala
Copy link
Member Author

@danielroe done

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

thank you ❤️

@danielroe danielroe merged commit af2ea90 into main Jan 7, 2025
7 checks passed
@danielroe danielroe deleted the feat/add-and-restructure-templates branch January 7, 2025 06:26
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