-
Notifications
You must be signed in to change notification settings - Fork 120
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
Fix: immediate recompilation #256
base: master
Are you sure you want to change the base?
Changes from 5 commits
046bf8f
f6aeb7e
c0532ee
2ac49be
9567b66
3683c61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,8 +234,6 @@ export const makeCompiler = ( | |
} | ||
}, | ||
compile: function (params: CompileParams) { | ||
const fileName = params.compile | ||
const code = fs.readFileSync(fileName, 'utf-8') | ||
const compiledPath = params.compiledPath | ||
|
||
// Prevent occasional duplicate compilation requests | ||
|
@@ -255,7 +253,11 @@ export const makeCompiler = ( | |
if (fs.existsSync(compiledPath)) { | ||
return | ||
} | ||
|
||
const starTime = new Date().getTime() | ||
|
||
const fileName = params.compile | ||
const code = params.code || fs.readFileSync(fileName, 'utf-8') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use the passed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't think this line even needs to still be here because the 'code' local variable is not actually used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the line as requested because the |
||
const m: any = { | ||
_compile: writeCompiled, | ||
} | ||
|
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.
… just because I had to look and experiment for a while to figure out how to compile this project.