eligius 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/eligius.esm.js
CHANGED
|
@@ -619,16 +619,20 @@ function _generateSourceCode(importPaths) {
|
|
|
619
619
|
|
|
620
620
|
return "import {" + imp.systemName + "} from '" + ((_imp$path = imp.path) != null ? _imp$path : 'eligius') + "';";
|
|
621
621
|
}));
|
|
622
|
+
result.push("import { ISimpleResourceImporter } from 'eligius';");
|
|
623
|
+
result.push('');
|
|
622
624
|
result.push('const imports: Record<string, any> = {');
|
|
623
625
|
result.push.apply(result, importPaths.map(function (imp) {
|
|
624
626
|
return imp.systemName + ": { '" + imp.systemName + "': " + imp.systemName + " },";
|
|
625
627
|
}));
|
|
626
628
|
result.push('};');
|
|
629
|
+
result.push('');
|
|
627
630
|
result.push('class EligiusResourceImporter implements ISimpleResourceImporter {');
|
|
628
631
|
result.push('import(name: string): Record<string, any> {');
|
|
629
632
|
result.push('if (imports.hasOwnProperty(name)) { return imports[name]; }');
|
|
630
633
|
result.push('throw Error(`Unknown systemName: ${name}`);');
|
|
631
634
|
result.push('}}');
|
|
635
|
+
result.push('');
|
|
632
636
|
result.push('export default EligiusResourceImporter;');
|
|
633
637
|
return result.join('\n');
|
|
634
638
|
}
|