Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1011 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /*
|
---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
| 3 | Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | "use strict";
|
---|
| 7 |
|
---|
| 8 | const ModuleFactory = require("../ModuleFactory");
|
---|
| 9 | const ContainerEntryModule = require("./ContainerEntryModule");
|
---|
| 10 |
|
---|
| 11 | /** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */
|
---|
| 12 | /** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */
|
---|
| 13 | /** @typedef {import("./ContainerEntryDependency")} ContainerEntryDependency */
|
---|
| 14 |
|
---|
| 15 | module.exports = class ContainerEntryModuleFactory extends ModuleFactory {
|
---|
| 16 | /**
|
---|
| 17 | * @param {ModuleFactoryCreateData} data data object
|
---|
| 18 | * @param {function(Error=, ModuleFactoryResult=): void} callback callback
|
---|
| 19 | * @returns {void}
|
---|
| 20 | */
|
---|
| 21 | create({ dependencies: [dependency] }, callback) {
|
---|
| 22 | const dep = /** @type {ContainerEntryDependency} */ (dependency);
|
---|
| 23 | callback(null, {
|
---|
| 24 | module: new ContainerEntryModule(dep.name, dep.exposes, dep.shareScope)
|
---|
| 25 | });
|
---|
| 26 | }
|
---|
| 27 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.