title: Compile an npm module into a single file, without dependencies
body: <p>I'm trying to compile an the <a href="https://github.com/giakki/uncss" rel="noreferrer">uncss</a> npm module into a single .js file that is suitable for compilation by ExecJS. For example, the coffee script guy has <a href="https://github.com/jashkenas/coffee-script/blob/master/extras/coffee-script.js" rel="noreferrer">this</a>. The goal is to create a simple ruby wrapper for it, similar to <a href="https://github.com/josh/ruby-coffee-script" rel="noreferrer">ruby-coffee-script</a>.</p>
  
  <p>What I have tried to far:</p>
  
  <ol>
  <li>Came across an answer that suggested UglifyJS. Got nowhere with it.</li>
  <li><p>Used browserify, which should have done the trick, but it fails to compile lib/uncss.js with the following error message:</p>
  
  <pre><code>Error: ENOENT, open 'tls' while resolving "tls" from file /home/prajjwal/code/uncss/node_modules/request/node_modules/forever-agent/index.js
  </code></pre></li>
  </ol>
  
  <p>I suppose this is because browserify does not have a proper shim for it? I'm also concerned about the shims that browserify replaces node modules with. Are they completely safe to use? I'm going to be embedding this into a ruby gem. Don't think browserify is what I should be using. Is there another way I can generate a stand alone .js from an npm module?</p>
  
  <p>Any help appreciated.</p>