-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Moves preprocessor stuff to the gulpfile. #8023
Moves preprocessor stuff to the gulpfile. #8023
Conversation
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://54.215.176.217:8877/1b531cbc8285caa/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/1b531cbc8285caa/output.txt Total script time: 6.18 mins Published |
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.
When testing locally, everything still appears to work correctly.
r=me, with comments addressed.
Really nice work migrating even more tasks to gulp, thanks for doing this!
@@ -296,6 +312,14 @@ function checkDir(path) { | |||
} | |||
} | |||
|
|||
function getTempFile(prefix, suffix) { | |||
mkdirp.sync(BUILD_DIR + 'tmp/'); |
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 noticed locally that this tmp/
directory is not removed after building is finished.
Since the temporary files are being removed, using fs.unlinkSync
, could we get rid of the directory as well for consistency?
One idea would perhaps be to remove both the temporary file and directory using a removeTempFile
helper function!?
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.
That is the tricky one: gulp tasks executed in parallel, so you may have multiple temp files opened. If we will try to count files of 'tmp/', there might be OS generated hidden files or just leftover after 'Ctrl+C' that might prevent removal of tmp.
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.
OK, let's just ignore that if it's not trivial; thanks for the explanation!
gulpfile.js
Outdated
var COMPONENTS_DIR = BUILD_DIR + 'components/'; | ||
var SINGLE_FILE_DIR = BUILD_DIR + 'singlefile/'; | ||
var MINIFIED_DIR = BUILD_DIR + 'minified/'; | ||
var FIREFOX_BUILD_DIR = BUILD_DIR + '/firefox/'; |
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.
Nit: I know that this is just copied straight from make.js
, but for consistency with the other cases just above, could this be ... = BUILD_DIR + 'firefox/';
instead?
gulpfile.js
Outdated
return createStringSource(source.substr(i + 1), out); | ||
} | ||
|
||
var COMMON_WEB_FILES = |
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.
Nit: You may want to move this "constant" to the top of the file, together with the other ones, to have all of them in one central place.
ff081f4
to
2049cf0
Compare
Moves preprocessor stuff to the gulpfile.
Moves all preprocessor logic and code from the make.js file and removes intermediate build/pdf.js, build/pdf.worker.js and build/viewer.js files (they were "last build configuration"-processed)
P.S. #7062