Skip to content

Instantly share code, notes, and snippets.

@jawngee
Created October 3, 2012 11:01
Show Gist options
  • Save jawngee/3826401 to your computer and use it in GitHub Desktop.
Save jawngee/3826401 to your computer and use it in GitHub Desktop.
bash script to combine multiple js files into main.js for Parse.com's Cloud shiz
#!/bin/bash
## combines multiple js files into main.js for deploying to parse
## Your separate js files should be in a directory 'source' that
## is at the same level as the 'cloud' and 'config' directories
## parse uses.
cat source/*.js > cloud/main.js
## deploy
parse deploy
@mturyn
Copy link

mturyn commented Jan 23, 2015

Something like
find source -type f -name "*.js" -exec cat {} ; >>cloud/main.js
would bring it all in...including any conflicts.

You ought to check out browserify, a tool intended for this sort of thing.

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