-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Make generator support installing remote templates #251
Comments
I'm starting work on this. |
Are you going to keep the local way for remote templates i.e. |
Happy that you ask. I just updated the description with what I think this issue should modify :) |
While working on this, I realized the I'm updating the description with the following: Changes this issue must introduce:
1. The syntax must now be something like `ag [options] <asyncapi> <templatePath|templateUrl|templatePackageName|templateGitUrl>`
1. All templates are now treated as "remote".
1. Rename the `-w, --watch` flag to `--watch-template`. Let's leave `-w, --watch` for "watching" the AsyncAPI file. Show a warning when the template directory under `node_modules` is not a symlink (i.e., it's a remote template).
-> 1. Slightly change the meaning of `--force-install`. It will now install the template **and** its dependencies.
1. Remove the `-t, --templates <templateDir>` flag. Keep reading to know why.
... |
🎉 This issue has been resolved in version 0.35.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes this issue must introduce:
ag [options] <asyncapi> <templatePath|templateUrl|templatePackageName|templateGitUrl>
-w, --watch
flag to--watch-template
. Let's leave-w, --watch
for "watching" the AsyncAPI file. Show a warning when the template directory undernode_modules
is not a symlink (i.e., it's a remote template).--force-install
. It will now install the template and its dependencies.-t, --templates <templateDir>
flag. Keep reading to know why.Installation is handled by the
npm install
command, which supports the following syntax:Therefore, the current
-t, --templates <templateDir>
flag can be removed and will always point to thenode_modules
folder of the generator. That will allow us to benefit from the npm cache system too.FAQ
What if I have a local template? Will I have to place it inside
node_modules
?No, you can keep working as usual.
npm install
will create a symlink to your folder and will place it undernode_modules
.Why depending on npm install?
It is much easier for us to rely on npm to do the job. We get a lot for free, including the cache —and a mechanism to skip it. In any case, we already had a dependency on npm when we decided to convert templates to npm packages (#219).
The text was updated successfully, but these errors were encountered: