reworkcss / rework-npm

Import CSS from npm modules using rework
BSD 2-Clause "Simplified" License
87 stars 19 forks source link

Add support for directory aliases #15

Closed necolas closed 10 years ago

necolas commented 10 years ago

Use case I have is wanting to alias part of a path (a la requirejs config).

--some/long/path
  --one
    --index.css
  --two
   --index.css

--some/other/path
  --text
    --index.css
use(reworkNPM({
  alias: {
    "components": "some/long/path"
    "utils": "some/other/path"
  }
});
@import "utils/text";
@import "components/one";
@import "components/two";
conradz commented 10 years ago

Fixed in 0665e94. The alias option is now applied to directories of imported files, and is never used for relative imports.

necolas commented 10 years ago

Thanks!