-
-
Notifications
You must be signed in to change notification settings - Fork 40
Buhov/local snapshot improvements #194
Conversation
...m on demand before snapshot generation
...ual to true only when in snapshot context
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.
style: let's make it an arrow func instead of using ternary operator 2 times
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.
style: just snapshotToolsPath
is more readable
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.
style: update the comment, too, or remove it
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.
style suggestion:
const { join, dirname } = require("path");
...
const getAbsolutePath = path => join(__dirname, path);
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.
Why do you think we need getAbsolutePath
function? It is as verbose as using join(__dirname, path)
but I find join(__dirname, path)
to be more clear.
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.
const
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.
const and maybe we should extract the url to some global var
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.
const
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.
extract the command
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.
erm, let's use exec
and not pipe the error stream to a file
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.
let's extract TNSSnapshot (the filename) to a const somewhere
24778ab
to
d18fd66
Compare
groceries
Uh oh!
There was an error while loading. Please reload this page.
mksnapshot
tools are now downloaded on demand before running them__snapshot
and__snapshotEnabled
global variables:__snapshotEnabled
-> has a value oftrue
if snapshot is loaded in the app__snapshot
-> has a value oftrue
when the executed code is in snapshot context andfalse
when the code is executed on device/emulatorplatforms/android/build
folder on snapshot generation in order to trigger full rebuild of the.apk
filesinclude.gradle
file even when blobs are used in order to exclude the snapshotted file from the apk.ANDROID_NDK_HOME
env variable in case androidNdkPath is not specified