Skip to content

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

Merged
merged 1 commit into from
Mar 13, 2018

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Feb 22, 2018

Copy link
Contributor

@rosen-vladimirov rosen-vladimirov left a 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.

@@ -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;
Copy link
Contributor

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;

@Fatme Fatme force-pushed the fatme/module-resolution branch 2 times, most recently from 56b508c to 9ad93df Compare March 9, 2018 10:05
@Fatme
Copy link
Contributor Author

Fatme commented Mar 9, 2018

ping @rosen-vladimirov

@Fatme
Copy link
Contributor Author

Fatme commented Mar 9, 2018

Should be merged with this PR NativeScript/nativescript-cli#3436

Copy link
Contributor

@rosen-vladimirov rosen-vladimirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@Fatme Fatme merged commit 4e07e01 into master Mar 13, 2018
@Fatme Fatme deleted the fatme/module-resolution branch March 13, 2018 11:58
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

Successfully merging this pull request may close these issues.

2 participants