-
-
Notifications
You must be signed in to change notification settings - Fork 245
feat: show error when --bundle option is not provided when executing some commands from {N} CLI #361
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
Conversation
Woah! I really like this idea! |
@@ -60,4 +61,27 @@ function write(dest, code) { | |||
} | |||
function logError(e) { | |||
console.log(e) | |||
} | |||
|
|||
function copyHooks() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this function in order to ensure the hooks directory will be copied to dist
folder on build step. This way we'll ensure the hooks directory will be included in built package.
But I am not sure what is exactly the approach you use to pack/bundle the plugin's code.
We need this code only in case if we want to have all the code that will be bundled inside dist
folder.
If you think this is unneeded, this function can be removed. If we decide to remove it, this line should be changed https://github.com/nativescript-vue/nativescript-vue/pull/361/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R9 as well.
Let me know about your opinion on this matter.
Woah! This is a nice idea, however I think solving this in the CLI would be a cleaner solution. See NativeScript/nativescript-cli#3873 That way the user can type both |
This needs to be merged as soon as possible. The current UX of an new user that comes to NativeScript + Vue and builds his application with the simples command |
It's a sweet merge BUT I believe it's breaking our new plugin: https://github.com/nativescript-vue/vue-cli-plugin-nativescript-vue - following the instructions to create and install the plugin, then running
which is strange because the npm script includes |
I believe this feature may have broken my builds -- even trying the out-of-the-box template: |
I don't use webpack since it's not compatible with nativescript-nodeify, I use js files exporting templates instead of vue files and that worked well. With this change I cannot build anymore since I don't use --bundle on purpose. |
@Papabyte That's a valid point, which we didn't take into consideration... I think you can comment out the hooks as a temporary workaround, but definitely something we should fix. Would you mind opening an issue about this? |
Currently it is not possible to use vue template without bundle option. So we need to show an error in case when the user executes some command without bundle option.
This PR adds 2 hooks - before-checkForChanges and before-watch. Thеsе hooks will be triggered automatically by {N} CLI when the command is executed.