projecte_ionic/node_modules/@ionic/angular-toolkit/builders/utils/append-scripts.js
2022-02-09 18:30:03 +01:00

13 lines
455 B
JavaScript
Executable file

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.augmentIndexHtml = void 0;
const cheerio_1 = require("cheerio");
function augmentIndexHtml(indexString, scripts) {
const $ = cheerio_1.load(indexString);
for (const script of scripts) {
$('html').append(`<script src="${script.bundleName}.js"></script>`);
}
const final = $.html();
return final;
}
exports.augmentIndexHtml = augmentIndexHtml;