 
   compile = (files)->
     startTime = Date.now()
+
+    return if startTime - lastBrowserified < BROWSERIFY_RATELIMIT
+    lastBrowserified = startTime
+
     watchReporter(path: file, type: 'changed') for file in files if files
 
     bundler.bundle(debug: config.source_maps)

    watchReporter(event)
    processStatic()

gulp.task('default', ['browserify', 'stylus', 'static'])
gulp.task('build', ['compress'])

helpers = require('app/javascripts/shared/helpers')
log = _.bind(helpers.log, logPrefix: '[gulp]')

bundler = null # for watchify to avoid memory leaks
lastBrowserified = 0


#=========================================================================================
# Settings
#=========================================================================================
RELOAD_TRIGGERS = ['rs', 'regulp']

ASSETS_LOCATION = './public/assets'
PUBLIC_LOCATION = './public'
CORE_LOCATION = './app'
