Skip to content

Conversation

@davidlj95
Copy link
Owner

Issue or need

Having sample apps in the repository has some disadvantages:

  1. Creating them requires running almost same steps multiple times
  2. Code using library is replicated amongst all of sample apps. Changing that code requires changing all sample apps.
  3. Dependency update bots (dependabot & Renovate) update sample apps: regular updates & security updates. Which implies more maintenance work.

Though to be fair, it has some:

  1. Deterministic E2E tests: the sample apps certainly don't change (unless dependency updates)
  2. Link to sample apps from docs. Useful to see how to use library with examples
  3. Less complexity: create them, move them, copy templates and that's it

Proposed changes

In order to improve disadvantages, introducing a script here to generate E2E sample apps. Which solves all disadvantages at expense of some extra complexity.

Determinism of generated apps will be improved in next PRs by pinning to a specific Angular CLI to generate those apps.

Docs have been updated to point to template files instead of now non-tracked & dynamically generated sample Angular apps.

Angular CLI schematics haven't been directly used for this purpose, but have definitely investigated (indeed parsing tsconfig code is extracted from Angular's compiler-cli pkg used by Angular's CLI). Main reason is that coupling to Angular CLI's CLI interface is a higher abstraction than schematics. So it's less possible it will change and will require maintenance. Also, don't have experience with schematics. So it would have taken a bit more time to create.

Quick reminders

  • 🤝 I will follow Code of Conduct
  • No existing pull request already does almost same changes
  • 👁️ Contributing docs are something I've taken a look at
  • 📝 Commit messages convention has been followed
  • 💬 TSDoc comments have been added or updated indicating API visibility if API surface has changed.
  • 🧪 Tests have been added if needed. For instance, if adding new features or fixing a bug. Or removed if removing features.
  • ⚙️ API Report has been updated if API surface is altered.

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on Graphite Graphite

@github-actions
Copy link

github-actions bot commented Apr 10, 2024

📦 Bundle size (Angular v15)

Git ref: b0d70e6dde15b6da352ef38aa55e3a886af42902

Module file Size Base size Difference
ngx-meta-core.mjs 3501 bytes (3.5KiB) 3507 bytes (3.5KiB) -.17%: -6 bytes (-6B)
ngx-meta-json-ld.mjs 392 bytes (392B) 392 bytes (392B) No change
ngx-meta-open-graph.mjs 1238 bytes (1.3KiB) 1238 bytes (1.3KiB) No change
ngx-meta-routing.mjs 1009 bytes (1009B) 1015 bytes (1015B) -.59%: -6 bytes (-6B)
ngx-meta-standard.mjs 885 bytes (885B) 885 bytes (885B) No change
ngx-meta-twitter-card.mjs 659 bytes (659B) 659 bytes (659B) No change
Total 7684 bytes (7.6KiB) 7696 bytes (7.6KiB) -.15%: -12 bytes (-12B)

@github-actions
Copy link

github-actions bot commented Apr 10, 2024

📦 Bundle size (Angular v16)

Git ref: b0d70e6dde15b6da352ef38aa55e3a886af42902

Module file Size Base size Difference
ngx-meta-core.mjs 3501 bytes (3.5KiB) 3507 bytes (3.5KiB) -.17%: -6 bytes (-6B)
ngx-meta-json-ld.mjs 392 bytes (392B) 392 bytes (392B) No change
ngx-meta-open-graph.mjs 1238 bytes (1.3KiB) 1238 bytes (1.3KiB) No change
ngx-meta-routing.mjs 1009 bytes (1009B) 1015 bytes (1015B) -.59%: -6 bytes (-6B)
ngx-meta-standard.mjs 885 bytes (885B) 885 bytes (885B) No change
ngx-meta-twitter-card.mjs 659 bytes (659B) 659 bytes (659B) No change
Total 7684 bytes (7.6KiB) 7696 bytes (7.6KiB) -.15%: -12 bytes (-12B)

@github-actions
Copy link

github-actions bot commented Apr 10, 2024

📦 Bundle size (Angular v17)

Git ref: b0d70e6dde15b6da352ef38aa55e3a886af42902

Module file Size Base size Difference
ngx-meta-core.mjs 3094 bytes (3.1KiB) 3094 bytes (3.1KiB) No change
ngx-meta-json-ld.mjs 226 bytes (226B) 226 bytes (226B) No change
ngx-meta-open-graph.mjs 899 bytes (899B) 899 bytes (899B) No change
ngx-meta-routing.mjs 839 bytes (839B) 839 bytes (839B) No change
ngx-meta-standard.mjs 768 bytes (768B) 768 bytes (768B) No change
ngx-meta-twitter-card.mjs 499 bytes (499B) 499 bytes (499B) No change
Total 6325 bytes (6.2KiB) 6325 bytes (6.2KiB) No change

@davidlj95 davidlj95 added the preview docs Enables previewing docs in a PR label Apr 10, 2024
@github-actions
Copy link

🎉 This PR is included in version 1.0.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview docs Enables previewing docs in a PR released on @main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants