title: Concatenate NPM package into one JS file
body: <p>I am trying to get <a href="http://paularmstrong.github.io/swig/">Swig</a> (the template language) working on <a href="https://parse.com/docs/cloud_code_guide">Parse Cloud Code</a> with Express. Parse Cloud Code is a Node/Express host that doesn't allow NPM. Ridiculous, I know. I can still load external files into code with requires statements however, so I think that there's hope I can get this working.</p>
  
  <p>So my question is how do I get the whole entire Swig package into a single JS file that I can include from my Parse Express app like so:</p>
  
  <pre><code>var swig = require("./cloud/swig.js");
  </code></pre>
  
  <p>Worth noting that Parse breaks normal require statements so that the NPM package as-is doesn't work without modifying each and every single file in the node_modules folder to have <code>cloud</code> in its path (which is why my above path has <code>cloud</code> in it). Parse also chokes while uploading lots of small files. Concatenation is a need on this platform.</p>
  
  <p>I have tried playing with browserify for hours, but no combination of anything I do makes exposes the Swig object when I load the browserified file with the require statement. I think it may be the right option since the Browserified file includes all the files from Swig, but it doesn't expose them externally. </p>
  
  <p>My question is either can this be done in browserify, and if so, how? Or is there another way to concatenate a NPM repo down to one file so it can be more easily included from this platform?</p>
  
  <p>Thanks so much.</p>