Created
May 23, 2013 02:14
-
-
Save ELLIOTTCABLE/5632377 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| browserify = require 'browserify' | |
| coffeeify = require 'coffeeify' | |
| glob = require 'glob' | |
| fs = require 'fs' | |
| task 'compile:client', "bundle JavaScript through Browserify", (options) -> | |
| bundle = browserify() | |
| #watch: options.watch # FIXME: Lost in 1.0 -> 2.0 | |
| #cache: true # FIXME: Lost in 1.0 -> 2.0 | |
| #exports: ['equire', 'process'] # FIXME: Lost in 1.0 -> 2.0 | |
| bundle.transform coffeeify | |
| bundle.ignore 'vm' | |
| bundle.add path.join '.', config.dirs.source, 'Paws.coffee' | |
| if options.tests | |
| bundle.add file for file in glob.sync config.package.testling.files | |
| fs.writeFile config.package.main.replace(/(?=\.(?:js|coffee))|$/, '.bundle'), | |
| bundle.bundle | |
| debug: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment