brunch / brunch-guide

A comprehensive guide to Brunch
http://brunch.io
MIT License
559 stars 61 forks source link

chapter04-starting-from-scratch.md > Split targets #2

Closed antonioquepasa closed 9 years ago

antonioquepasa commented 9 years ago

@tdd : Hi Christophe, I can't seem to be able to have this to work properly:

'libraries.js': /^app\/jquery\.js/
'app.js': /^(?!app\/jquery\.js)/

Running the example code, it creates the app.js but not the libraries.js. The jQuery just gets into app.js. If I replace the libraries' regex by a plain string, then the file gets created. Anything possibly wrong with the regex?

Thanks,

Antoine

tdd commented 9 years ago

Hey Antoine,

Have you tried with the provided repo? Does it work there? (it should, it worked while writing this).

If you're going with your own attempts, can you confirm your JS file is indeed jquery.js, all lowercase?

Cheers,

antonioquepasa commented 9 years ago

Provided repo --> Yes, I did. Just to be on the safe side, I just did it once again with identical result (all JS code goes into app.js, libraries.js does not get created).

jquery,js all lowercase

Could being on a Windows machine have any influence?

tdd commented 9 years ago

Ooooooh that's a good point. Slashes / backslashes? God that'd suck. I advise you try with the following settings:

'libraries.js': /^app\\jquery\.js/
'app.js': /^(?!app\\jquery\.js)/
antonioquepasa commented 9 years ago

Ça fait la job ! ™

Goddam, j'aurais dû y penser...

Merci !

Antoine

tdd commented 9 years ago

Grmbl. Je vais changer les regex.