diff --git a/index.js b/index.js index c64fbe7..756974e 100644 --- a/index.js +++ b/index.js @@ -10,8 +10,8 @@ module.exports = function (source) { // wepkack3: options var options = utils.getOptions(this); - - // merge opts from defaults,opts and query + + // merge opts from defaults,opts and query var opts = merge({ client: true, compileDebug: !!this.minimize, @@ -24,6 +24,18 @@ module.exports = function (source) { // minify html if (opts.htmlmin) source = htmlmin.minify(source, opts.htmlminOptions); + // Build open delimiter from options + const delim = opts.delimiter || "%"; + const open = opts.openDelimiter || "<"; + let openDelimiter = "<%".replace(/%/g, delim).replace(/ { + this.addDependency(path.resolve(this.context, link)) + }); + // compile template var template = ejs.compile(source, merge(opts, { filename: path.relative(process.cwd(), this.resourcePath),