|
|
|
@ -14,7 +14,7 @@ const profile = { |
|
|
|
|
name: 'contentImport', |
|
|
|
|
displayName: 'content import', |
|
|
|
|
version: packageJson.version, |
|
|
|
|
methods: ['resolve', 'resolveAndSave'] |
|
|
|
|
methods: ['resolve', 'resolveAndSave', 'isExternalUrl'] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
module.exports = class CompilerImports extends Plugin { |
|
|
|
@ -105,6 +105,15 @@ module.exports = class CompilerImports extends Plugin { |
|
|
|
|
return /^([^/]+)/.exec(url) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isExternalUrl (url) { |
|
|
|
|
for (const handler of this.handlers()) { |
|
|
|
|
if (handler.match.exec(url)) { |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* resolve the content of @arg url. This only resolves external URLs. |
|
|
|
|
* |
|
|
|
|