alanshaw / grunt-include-replace

Grunt task to include files and replace variables. Allows for parameterised includes.
MIT License
200 stars 45 forks source link

requirejs: Using docroot on windows results in windows directory separators in path #25

Closed thomasklein closed 10 years ago

thomasklein commented 10 years ago

Hi! Thanks for your plugin to begin with! :)

As the title says, on windows I'm currently ending up with

@@docrootstyles.css
..\../styles.css

which is only a cosmetic problem for css files as it still gets loaded, but if I use the relative path

..\../

as a basic to include more files with requirejs, it does convert the above path to

..../

Could you include an option to define the directory separator? Or maybe have it solved automatically?

Cheers, Thomas

alanshaw commented 10 years ago

Fixed and published as grunt-include-replace@1.1.2

thomasklein commented 10 years ago

Awesoooooome!!! :+1:

thomasklein commented 10 years ago

Sorry, too early. Please change

.replace('\\', '/')

to

.replace(/\\/g, '/')

otherwise it won't work. Thanks!

alanshaw commented 10 years ago

argh, of course

thomasklein commented 10 years ago

I'm at work otherwise I would send you a Pull request...Anyway, thanks for answering so super fast! :)

alanshaw commented 10 years ago

Fixed in v1.1.3