mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
19 lines
406 B
JavaScript
Executable File
19 lines
406 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
const fs = require('fs');
|
|
const config = require('../config.js');
|
|
|
|
let index = fs.readFileSync('index.html', 'utf-8');
|
|
|
|
const toReplace = [
|
|
[
|
|
'<!--EXTRA_SCRIPTS-->',
|
|
"<script src='/static/custom-elements-es5-adapter.js'></script>"
|
|
],
|
|
];
|
|
|
|
for (item of toReplace) {
|
|
index = index.replace(item[0], item[1]);
|
|
}
|
|
|
|
fs.writeFileSync(`${config.buildDirLegacy}/index.html`, index);
|