Skip to content
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

Merged
merged 1 commit into from
Feb 4, 2017

Conversation

yurydelendik
Copy link
Contributor

@yurydelendik yurydelendik commented Feb 4, 2017

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

@yurydelendik
Copy link
Contributor Author

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Feb 4, 2017

From: Bot.io (Windows)


Received

Command cmd_preview from @yurydelendik received. Current queue size: 0

Live output at: http://54.215.176.217:8877/1b531cbc8285caa/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Feb 4, 2017

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/1b531cbc8285caa/output.txt

Total script time: 6.18 mins

Published

@Snuffleupagus Snuffleupagus self-requested a review February 4, 2017 10:23
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a 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/');
Copy link
Collaborator

@Snuffleupagus Snuffleupagus Feb 4, 2017

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!?

Copy link
Contributor Author

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.

Copy link
Collaborator

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/';
Copy link
Collaborator

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 =
Copy link
Collaborator

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.

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.

3 participants