-
-
Notifications
You must be signed in to change notification settings - Fork 10
Use moduleResolution classic when --syncAllFiles option is not specified #44
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
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.
It is important to update the before-watch hook as well. You'll have to modify the call of the hook itself in CLI. You can pass the watchAllFiles
option (you have it in the context there) inside the hookArgs and read it in the watch hook.
lib/before-prepare.js
Outdated
@@ -11,5 +11,6 @@ module.exports = function ($logger, $projectData, $options, hookArgs) { | |||
} | |||
|
|||
var release = $options.release || appFilesUpdaterOptions.release; | |||
return compiler.runTypeScriptCompiler($logger, $projectData.projectDir, { release }); | |||
var syncAllFiles = $options && $options.syncAllFiles; |
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.
this will not work in case the hook is executed from Sidekick (i.e. when CLI is used as a library). In this case the $options
values will be the default ones as there's no command line args to populate them. Instead of using $options
, you'll have to modify the preparePlatformCore method to receive this value as an argument. For example, we can add skipModulesNativeCheck
(as there's already such value in the preparePlatform
method) in the appFilesUpdaterOptions
object and you can access it here via:
const skipModulesNativeCheck = hookArgs && hookArgs.appFilesUpdaterOptions && hookArgs.appFilesUpdaterOptions.skipModulesNativeCheck;
const syncAllFiles = $options && $options.syncAllFiles || !skipModulesNativeCheck;
56b508c
to
9ad93df
Compare
9ad93df
to
3d8d32f
Compare
ping @rosen-vladimirov |
Should be merged with this PR NativeScript/nativescript-cli#3436 |
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.
Great work!
Fixes NativeScript/nativescript-cli#3378