How to use the compileClientWithDependenciesTracked function from jade

Find comprehensive JavaScript jade.compileClientWithDependenciesTracked code examples handpicked from public code repositorys.

19
20
21
22
23
24
25
26
27
28

options.filename = fileName;

var result;
try {
    result = jade.compileClientWithDependenciesTracked(inputString, options);
} catch (e) {
    self.emit("error", e);
    return;
}
fork icon25
star icon161
watch icon0

90
91
92
93
94
95
96
97
98

      src += '('+ args.join(',') +')';
    }
  }
  // compile jade
  var compiled = jade.compileClientWithDependenciesTracked(src, { filename: filename });
  // render jade function
  return Function('jade', compiled.body + '\n' +'return template('+ JSON.stringify(meta.locals || {}) +');')(jadeRuntime);
}
fork icon3
star icon0
watch icon3

18
19
20
21
22
23
24
25
26
27
    pretty = query.pretty;
} else if (this.minimize !== undefined) {
    pretty = !this.minimize;
}

result = jade.compileClientWithDependenciesTracked(source, {
    compileDebug: compileDebug,
    filename: filename,
    globals: query.globals || [],
    pretty: Boolean(pretty),
fork icon0
star icon1
watch icon2

22
23
24
25
26
27
28
29
30
const validated = Joi.validate(_opts, schema)
if (validated.error) { throw validated.error }
const opts = validated.value

// compile the template to a function
const tpl = jade.compileClientWithDependenciesTracked(source, opts)

// add all dependencies to webpack
tpl.dependencies.map(this.addDependency.bind(this))
fork icon0
star icon1
watch icon4

11
12
13
14
15
16
17
18
19
20
    dependencies: fn.dependencies
  }
}

exports.compileClient = function (source, options) {
  return jade.compileClientWithDependenciesTracked(source, options)
}

exports.compileFile = function (path, options) {
  const fn = jade.compileFile(path, options)
fork icon1
star icon0
watch icon3

15
16
17
18
19
20
21
22
23
24
var that = this;

var result;

try {
  result = jade.compileClientWithDependenciesTracked(data, {filename:file});
} catch(e) {
  that.emit('error', e);
  return;
}
fork icon0
star icon0
watch icon2