MCPcopy
hub / github.com/meteor/meteor / addLegacyHandler

Method addLegacyHandler

tools/isobuild/build-plugin.js:134–156  ·  view source on GitHub ↗
({ extension, handler, packageDisplayName, isTemplate,
                     archMatching })

Source from the content-addressed store, hash-verified

132 }
133
134 addLegacyHandler({ extension, handler, packageDisplayName, isTemplate,
135 archMatching }) {
136 if (this._allowConflicts) {
137 throw Error("linters have no legacy handlers");
138 }
139
140 if (this._byExtension.hasOwnProperty(extension)) {
141 this._conflictError(packageDisplayName,
142 this._byExtension[extension].isopack.displayName(),
143 '*.' + extension);
144 // recover by ignoring
145 return;
146 }
147 if (this._legacyHandlers.hasOwnProperty(extension)) {
148 this._conflictError(packageDisplayName,
149 this._legacyHandlers[extension].packageDisplayName,
150 '*.' + extension);
151 // recover by ignoring
152 return;
153 }
154 this._legacyHandlers[extension] =
155 {handler, packageDisplayName, isTemplate, archMatching};
156 }
157
158 // Adds all the source processors (and legacy handlers) from the other set to
159 // this one. Logs buildmessage errors on conflict. Ignores packageDisplayName

Callers 2

mergeMethod · 0.95
isopack.jsFile · 0.80

Calls 2

_conflictErrorMethod · 0.95
displayNameMethod · 0.45

Tested by

no test coverage detected