backbone-boilerplate / grunt-bbb-styles

WIP Grunt BBB styles compilation.
MIT License
0 stars 2 forks source link

Forcing relative path #4

Closed sbay closed 10 years ago

sbay commented 10 years ago

If style rules include relative paths in its URLs and we are using a "forceRelative" option, we should really only apply the file name to the forceRelative path.

Example: forceRelative: "/app/images/" background: url('../some/folder/bg.jpg');

should really compile to: background: url('/app/images/bg.jpg')

and not background: url('/app/images/../some/folder/bg.jpg')

tbranyen commented 10 years ago

That sounds more like a replacePath option. Would that be hard to implement?

tbranyen commented 10 years ago

Pretty sure it's just adding that to the options, putting an if statement around your newly added code block, and update to use the new option value.

sbay commented 10 years ago

@tbranyen Just pushed the new code with your proposed scenario.

tbranyen commented 10 years ago

Perfect, thanks for the help!