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

Use closure compiler from npm in build.js #655

Merged
merged 1 commit into from
Oct 18, 2019

Conversation

vbfox
Copy link
Contributor

@vbfox vbfox commented Oct 17, 2019

This use the script npm generate in .bin inside build.js so that the version align and a global install isn't necessary.

Copy link
Collaborator

@stanley-cheung stanley-cheung left a comment

Choose a reason for hiding this comment

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

I am not entirely sure about this. What's the difference between doing it this way __dirname, "../node_modules/.bin vs npx google-closure-compiler?

@vbfox
Copy link
Contributor Author

vbfox commented Oct 18, 2019

If the current directory contains the node_modules folder (or is a subdirectory) there is no difference, npx will essentially find the same file specified here in .bin and run it.

Accessing it directly only changes the behavior if the current directory is somewhere else (npx will get the latest version from npm)

In the end it's you choice there is not much difference (A little bit more security on what version is resolved that's all)

Copy link
Collaborator

@stanley-cheung stanley-cheung left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants