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