Skip to content

Commit

Permalink
Add upgrade informations to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
maoberlehner committed Nov 1, 2016
1 parent d052356 commit 824012a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,34 @@ sass.render({
node-sass --importer node_modules/node-sass-magic-importer/dist/cli.js -o dist src/index.scss
```

## Upgrade to 2.x.x from 1.x.x
Version 2.x.x does not return a node-sass custom importer function directly. Instead a function which can take a optional parameter for configuration is returned. When the function is executed, it returns a node-sass custom importer function.

If you want to use the `node-sass-magic-importer` in combination with the node-sass CLI, you now have to specify the path to the `node-sass-magic-importer` CLI script.

```node
sass.render({
...
// Old
importer: magicImporter,
magicImporter: {
cwd: process.cwd()
}
// New
importer: magicImporter({
cwd: process.cwd()
})
...
});
```

```bash
# Old
node-sass --importer node_modules/node-sass-magic-importer -o dist src/index.scss
# New
node-sass --importer node_modules/node-sass-magic-importer/dist/cli.js -o dist src/index.scss
```

## About
### Author
Markus Oberlehner
Expand Down

0 comments on commit 824012a

Please sign in to comment.