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

Feature Request: Enhancement of "modular add ..." #1366

Open
steveukx opened this issue Feb 4, 2022 · 0 comments
Open

Feature Request: Enhancement of "modular add ..." #1366

steveukx opened this issue Feb 4, 2022 · 0 comments

Comments

@steveukx
Copy link
Contributor

steveukx commented Feb 4, 2022

The current modular add ... command enables developers to scaffold new apps and views in their modular workspace based on template files within the modular-scripts module itself.

This feature would enhance the current functionality to allow referencing templates as either an npm module name or a cloneable git repository URL. By making this change, modular would be:

  • more lightweight: there will no longer be the need to bundle the templates along with modular-scripts so they wouldn't form part of the initial download when installing modular-scripts.

  • more flexible: unlocks the ability for other libraries/frameworks to share templates through the modular eco-system, either by sharing examples as separate repos, or publishing examples into a package manager (npm/yarn etc) as part of a build process.

  • more responsive: the templates used by modular add will no longer be bound to the version of modular-scripts being used, meaning that upgrades and updates to the template can be published independently of modular-scripts.

Examples:

# use the content of @steveukx/some-view-example module published to npm:
modular add @steveukx/some-view-example

# use a git export from the specified git remote
modular add https://github.com/steveukx/some-view-example.git

# use a short name to reference a package known to modular-scripts
# this would be the module @modular-scripts/template-view
modular add view
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

No branches or pull requests

1 participant