add getModuleName option - fixes #844
This commit is contained in:
parent
15f1978cae
commit
f2c5accab3
@ -86,10 +86,12 @@ File.validOptions = [
|
||||
"format",
|
||||
"playground",
|
||||
"experimental",
|
||||
"resolveModuleSource",
|
||||
"externalHelpers",
|
||||
"auxiliaryComment",
|
||||
|
||||
"resolveModuleSource",
|
||||
"getModuleName",
|
||||
|
||||
// these are used by plugins
|
||||
"ignore",
|
||||
"only",
|
||||
|
||||
@ -146,6 +146,8 @@ DefaultFormatter.prototype.isLocalReference = function (node, scope) {
|
||||
|
||||
DefaultFormatter.prototype.getModuleName = function () {
|
||||
var opts = this.file.opts;
|
||||
if (opts.getModuleName) return opts.getModuleName(opts.filename);
|
||||
|
||||
var filenameRelative = opts.filenameRelative;
|
||||
var moduleName = "";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user