main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[79a0317] | 1 | /*
|
---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
| 3 | Author Tobias Koppers @sokra
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | "use strict";
|
---|
| 7 |
|
---|
| 8 | /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */
|
---|
| 9 | /** @typedef {import("./Chunk")} Chunk */
|
---|
| 10 | /** @typedef {import("./ChunkGroup")} ChunkGroup */
|
---|
| 11 | /** @typedef {import("./DependenciesBlock")} DependenciesBlock */
|
---|
| 12 | /** @typedef {import("./Module")} Module */
|
---|
| 13 |
|
---|
| 14 | /**
|
---|
| 15 | * @param {ChunkGroup} chunkGroup the ChunkGroup to connect
|
---|
| 16 | * @param {Chunk} chunk chunk to tie to ChunkGroup
|
---|
| 17 | * @returns {void}
|
---|
| 18 | */
|
---|
| 19 | const connectChunkGroupAndChunk = (chunkGroup, chunk) => {
|
---|
| 20 | if (chunkGroup.pushChunk(chunk)) {
|
---|
| 21 | chunk.addGroup(chunkGroup);
|
---|
| 22 | }
|
---|
| 23 | };
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * @param {ChunkGroup} parent parent ChunkGroup to connect
|
---|
| 27 | * @param {ChunkGroup} child child ChunkGroup to connect
|
---|
| 28 | * @returns {void}
|
---|
| 29 | */
|
---|
| 30 | const connectChunkGroupParentAndChild = (parent, child) => {
|
---|
| 31 | if (parent.addChild(child)) {
|
---|
| 32 | child.addParent(parent);
|
---|
| 33 | }
|
---|
| 34 | };
|
---|
| 35 |
|
---|
| 36 | module.exports.connectChunkGroupAndChunk = connectChunkGroupAndChunk;
|
---|
| 37 | module.exports.connectChunkGroupParentAndChild =
|
---|
| 38 | connectChunkGroupParentAndChild;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.