Skip to content

Commit ba4b426

Browse files
update readme
1 parent 79d32a9 commit ba4b426

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ Metalsmith()
7171
});
7272
```
7373

74+
As of version [v1.1](https://github.com/stevenschobert/metalsmith-sass/releases/v1.1.0), you can also use a function to dynamically manipulate the output dir.
75+
76+
This is useful if you want to preserve your folder structure, but change just one folder name.
77+
78+
```js
79+
Metalsmith()
80+
.source("src/")
81+
.destination("build/")
82+
.use(sass({
83+
outputDir: function(originalPath) {
84+
// this will change scss/some/path to css/some/path
85+
return originalPath.replace("scss", "css");
86+
}
87+
}))
88+
.build(function () {
89+
done();
90+
});
91+
```
92+
7493
## Source Maps
7594

7695
The easiest way to enable source maps in your metalsmith project is to add the following options:

0 commit comments

Comments
 (0)