-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added util script to remove
export {};
from frontend JS
- Loading branch information
Josh Moore
committed
Jul 13, 2023
1 parent
466fc5e
commit 26c6841
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const fs = require('fs-extra'); | ||
const { path } = require('@tycrek/joint'); | ||
const log = new (require('@tycrek/log').TLog)(); | ||
|
||
log.info('Fixing frontend JS'); | ||
|
||
// Read & fix file data | ||
const setupUiFile = path.join('dist-frontend/setup.mjs'); | ||
const setupUiNew = fs.readFileSync(setupUiFile).toString().replace('export {};', ''); | ||
|
||
// Write new file | ||
fs.writeFileSync(setupUiFile, setupUiNew); | ||
|
||
log.success('Fixed.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters