configuration - Why brunch compile everything it found when using function in joinTo -


i don't understand why brunchjs compile files (in bower_components) when use function (coffeescript):

modules = ['i18n', 'pager', 'core', 'module-comment']  javascripts:   jointo:      # main     '/js/master.js': () ->       paths = ['bower_components/bootstrap/**/*', 'app/**/*']         o in modules          fs.exists '../../../../workbench/dynamix/' + o, (exists) ->           if exists             paths.push '../../../../workbench/dynamix/' + o + '/public/public/**/*'           else             paths.push '../../../../vendor/dynamix/' + o + '/public/public/**/*'       return paths 

i want test if path exist, if yes put complete path in variable return jointo. have successfuly files in workbench/vendor undesired files bower_components (don't specified?!)

i optimize :

javascripts:   jointo:      # main     '/js/master.js':          'bower_components/bootstrap/**/*'       '../../../../workbench/dynamix/i18n/public/public/**/*'       '../../../../workbench/dynamix/pager/public/public/**/*'       '../../../../vendor/dynamix/core/public/public/**/*'       '../../../../workbench/dynamix/module-comment/public/public/**/*'       '../../../../workbench/dynamix/module-love-live-music/public/public/**/*'       '../../../../workbench/dynamix/module-rating/public/public/**/*'       '../../../../workbench/dynamix/module-registration/public/public/**/*'       'app/**/*' 

i'm sorry didn't find documentation use function in jointo.

thanks

a function in jointo should take file path argument , return true if path should included, false if not. described in anymatch documentation.

your function appears return truthy value, meaning every path brunch watching included.

what might have intended use iife, return value of function (invoked during initial code evaluation) gets assigned jointo. in coffeescript can accomplish using do keyword, instead of starting off function definition () -> it'd do -> instead.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -