Files
notification-elements-demo/node_modules/license-webpack-plugin/dist/WebpackAssetManager.js
Giuliano Silvestro 5d0c9ec7eb Initial commit: notification-elements-demo app
Interactive Angular 19 demo for @sda/notification-elements-ui with
6 sections: Bell & Feed, Notification Center, Inbox, Comments &
Threads, Mention Input, and Full-Featured layout. Includes mock
data, dark mode toggle, and real-time event log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:49:19 +10:00

39 lines
1.8 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebpackAssetManager = void 0;
var webpack_sources_1 = require("webpack-sources");
var WebpackAssetManager = /** @class */ (function () {
function WebpackAssetManager(outputFilename, licensesRenderer) {
this.outputFilename = outputFilename;
this.licensesRenderer = licensesRenderer;
}
WebpackAssetManager.prototype.writeChunkLicenses = function (modules, compilation, chunk) {
var text = this.licensesRenderer.renderLicenses(modules);
if (text && text.trim()) {
var filename = compilation.getPath(this.outputFilename, { chunk: chunk });
compilation.assets[filename] = new webpack_sources_1.RawSource(text);
}
};
WebpackAssetManager.prototype.writeChunkBanners = function (modules, compilation, chunk) {
var filename = compilation.getPath(this.outputFilename, { chunk: chunk });
var text = this.licensesRenderer.renderBanner(filename, modules);
if (text && text.trim()) {
var files = chunk.files instanceof Set ? Array.from(chunk.files) : chunk.files;
files
.filter(function (file) { return /\.js$/.test(file); })
.forEach(function (file) {
compilation.assets[file] = new webpack_sources_1.ConcatSource(text, compilation.assets[file]);
});
}
};
WebpackAssetManager.prototype.writeAllLicenses = function (modules, compilation) {
var text = this.licensesRenderer.renderLicenses(modules);
if (text) {
var filename = compilation.getPath(this.outputFilename, compilation);
compilation.assets[filename] = new webpack_sources_1.RawSource(text);
}
};
return WebpackAssetManager;
}());
exports.WebpackAssetManager = WebpackAssetManager;