You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,25 @@ Metalsmith()
71
71
});
72
72
```
73
73
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
+
returnoriginalPath.replace("scss", "css");
86
+
}
87
+
}))
88
+
.build(function () {
89
+
done();
90
+
});
91
+
```
92
+
74
93
## Source Maps
75
94
76
95
The easiest way to enable source maps in your metalsmith project is to add the following options:
0 commit comments