Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Conversation

hmedhat
Copy link

@hmedhat hmedhat commented Nov 13, 2017

I was trying to find an alternative for plovr while development, because plovr is a little bit far behind and upgrading google closure every time is becoming troublesome there.

So I considered using gulp. I set up a gulp webserver using gulp connect and on fallback, it triggers the google closure compile, then it waits until the file is generated and it will then serve it to the client. The problem that I am facing is that the compile time is much bigger than plovr ~40s vs ~20s. So I managed to solve that by using nailgun to run the jar, and this way I can avoid the overhead of the jvm run time. and I actually reached the same compile time as plovr.

The is only one problem with this pull request that using running closure compiler using src won't work anymore, it gives that error in from the compile process error

{ Error: Nailgun failed to start up.
    at NailgunServer._receiveServerClose (/home/hatem/coscale/interfaces/app/node_modules/node-nailgun/src/NailgunServer.js:107:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
  nailgunStdout: 'com.martiansoftware.nailgun.builtins.NGAlias: 0/0\ncom.martiansoftware.nailgun.builtins.NGClasspath: 0/0\ncom.martiansoftware.nailgun.builtins.NGServerStats: 0/0\ncom.martiansoftware.nailgun.builtins.NGStop: 0/0\ncom.martiansoftware.nailgun.builtins.NGVersion: 0/0\nNGServer shut down.\n' }

I could not find the solution for this problem, so any help here would be appreciated.

Here is a link for my initial problem:
https://stackoverflow.com/questions/46957958/decreasing-google-closure-run-time-using-gulp

…t running the jar.

This has imporved the speed of compilation because there is no overhead for running the jvm.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@hmedhat
Copy link
Author

hmedhat commented Nov 13, 2017

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@ChadKillingsworth
Copy link
Collaborator

I love the idea of nailgun and actually would like to make it the default for webpack when a watch mode is implemented. However there would be substantial pushback from users requiring it for this plugin. Best bet would be to create a new nailgun specific project that has google-closure-compiler as a dependency.

There are specific hooks in this project which allow the use of nailgun. See #51.

I would definitely entertain adding a section to the readme at the bottom discussing how to do this.

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

Successfully merging this pull request may close these issues.

3 participants