Skip to content

Commit

Permalink
Remove handling of options.externalRuntime
Browse files Browse the repository at this point in the history
It's more intuitive to have the same option name for all functions, albeit
with different defaults.
  • Loading branch information
TimothyGu committed Nov 1, 2015
1 parent d2bfb19 commit 1eeb9e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ exports.compileClientWithDependenciesTracked = function(str, options){
basedir: options.basedir,
pretty: options.pretty,
doctype: options.doctype,
inlineRuntimeFunctions: options.externalRuntime ? false : true,
inlineRuntimeFunctions: options.inlineRuntimeFunctions !== false,
globals: options.globals,
self: options.self,
includeSources: options.compileDebug,
Expand Down
2 changes: 1 addition & 1 deletion register.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var jade = require('./');
var resolvedJade = require.resolve('./');

function compileTemplate(module, filename) {
var template = jade.compileFileClient(filename, {externalRuntime: true});
var template = jade.compileFileClient(filename, {inlineRuntimeFunctions: false});
var body = "var jade = require('" + resolvedJade + "').runtime;\n\n" +
"module.exports = " + template + ";";
module._compile(body, filename);
Expand Down

2 comments on commit 1eeb9e6

@TimothyGu
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ForbesLindesay sorry about this change pushed directly to master – forgot to make a branch when making changes. Do you have any comments on this?

@ForbesLindesay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok with me. In general it's better for options to default to false (more intuitive), but I think this is fine. It's such a specialised option I would hope that very few people even touch it.

Please sign in to comment.