donejs / deploy

Deployment utilities for DoneJS
MIT License
4 stars 1 forks source link

Rewrite css paths #11

Closed matthewp closed 9 years ago

matthewp commented 9 years ago

We need to rewrite the paths to images in css. For example you might have:

dev

pmo/
  header/
    header.css: url(../images/logo.png)
  images/
    logo.png

prod

dist/
  bundles/
    header/
      header.css: url("../../images/logo.png")
  images/
    logo.png
matthewp commented 9 years ago

css rewrite: https://github.com/stealjs/steal-css/blob/master/css.js#L23

matthewp commented 9 years ago

The urls have already been rewritten by steal-tools at this point, so I think we can check if the file exists and is part of the files we are moving, and if so do the rewrite.

mjstahl commented 9 years ago

https://github.com/stealjs/steal-bundler

mjstahl commented 9 years ago

Fixed: https://github.com/stealjs/steal-bundler/commit/f152dd386fbbe55825f131724bc791128d7edcd0