why is brunch copying bower dependencies instead of compiling into vendor.js and app.css
See original GitHub issueFor one of my bower dependencies, the css and js file specified by its main
declaration in its bower.json
file are being copied straight to the output css
and js
directories, rather than being compiled into vendor.js
and app.css
.
All other bower dependencies are being compiled as expected. I’ve tried deleting the bower_components
directory and reinstalling and deleting the public
directory, but neither has helped.
I’m using brunch version 1.7.10
My config.coffee
file looks like this:
exports.config =
# See http://brunch.io/#documentation for docs.
files:
javascripts:
joinTo:
'js/app.js': /^(app)/
'js/vendor.js': /^(bower_components)/
'test/js/test.js': /^test(\/|\\)(?!bower_components)/
'test/js/test-bower_components.js': /^test(\/|\\)(?=bower_components)/
stylesheets:
joinTo:
'css/app.css' : /^(app|bower_components)/
templates:
joinTo: 'app.js'
modules:
nameCleaner: (path) ->
path.replace(/^app\/scripts\//, '')
the main
declaration for in the bower.json
for the dependency that is copying instead of compiling looks like this:
"main": [
"./BS3/assets/js/datatables.js",
"./BS3/assets/css/datatables.css"
]
These two files just get copied straight, instead of compiled, and I can’t for the life of me figure out why these are behaving differently to all the other dependencies I have.
Issue Analytics
- State:
- Created 10 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Should this work (limits the
assets
match to just theapp
directory)?That seems to have done the trick, many thanks.