Skip to content

Commit 152f5d9

Browse files
committed
adding whitespace option support
1 parent cddb81e commit 152f5d9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import md5 from 'md5'
2-
import { compile } from 'dustjs-linkedin'
2+
import dust, { compile } from 'dustjs-linkedin'
33
import { basename, dirname, extname, resolve } from 'path'
44

55
const { floor, random } = Math
@@ -37,8 +37,11 @@ function resolvePartials (source, parentPath) {
3737
}
3838
}
3939

40-
// TODO: options
41-
export default function dustjs () {
40+
export default function dustjs (options = {}) {
41+
if (options.whitespace === true) {
42+
dust.config.whitespace = true
43+
}
44+
4245
return {
4346
name: 'dustjs',
4447
transform (source, path) {

0 commit comments

Comments
 (0)