Update: For anyone interested in using Brunch with AngularJS I've put together a seed project angular-brunch-seed
I'm using Brunch with AngularJS. AngularJS provides a module system so the need for importing file using commonJS / AMD is redundant. Is it possible to disable this feature for files in the /app
directory? Essentially I would like it to compile files unaltered like it does for the /vendor
directory.
So the preferred out come would be:
joinTo:
'js/app.js': /^app/
'js/vendor.js': /^vendor/
With both js/app.js
and js/vender.js
containing compile files from each respective folder, but neither wrapped.
Does anyone have any ideas?
UPDATE The syntax has changed from when @jcruz answer. Here's the way to do this now.
In the end I went with a modified version of @jcruz answer.
exports.config =
modules:
definition: false
wrapper: (path, data) ->
"""
(function() {
'use strict';
#{data}
}).call(this);\n\n
"""
files:
javascripts:
defaultExtension: 'coffee'
joinTo:
'js/app.js': /^app/
'js/vendor.js': /^vendor/
By default the "raw" wrapper does not include coffeescript's standard wrapper. By setting jsWrapper to:
wrapper: (path, data) ->
"""
(function() {
'use strict';
#{data}
}).call(this);
"""
files will be wrapped as expected.