I understand how brunch handles javascript files, combining them into individual output files:
files:
javascripts:
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
'test/javascripts/test.js': /^test(\/|\\)(?!vendor)/
'test/javascripts/test-vendor.js': /^test(\/|\\)(?=vendor)/
the 2nd line, for example, takes all the javascript files in the /vendor/ folder and makes the vendor.js
The Regex (/^vendor/) specifies a folder path correct? Any way to have the regex apply to the file names as well? For example if there was a jquery.js and a jquery.min.js, I just want the jquery.js file included. Is this possible?
You can use functions to test against paths. With them stuff should be simple:
joinTo:
'javascripts/vendor.js': (path) ->
/^vendor/.test(path) and not /\.min\.js$/.test(path)
You can give the paths to be ignored. The regex should match complete path for files, filenames included.
paths:
public: '../deploy'
ignored: 'vendor/styles/bootstrap'
test: 'spec'
ignored key: string, regExp, function or array of them. Will check against files that would be ignored by brunch compilator.
But as Amberlamps suggested you can give regex to exclude *.min.js files in the files .
PS:
Never tested it but in the docs somewhere it is mentioned /_spec\.\w+$/ matches for user_spec.js.
I have never used brunch before, but if it is using RegExp to find specific paths you can exclude *.min.js files using:
/^((?!vendor\/.*\.min\.js).)*$/
I used following answer as reference: Regular expression to match string not containing a word?