Skip to content

Commit

Permalink
* (bluefox) added patternForWidgetsFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Sep 21, 2024
1 parent 1e5520d commit f01731e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ node node_modules/@iobroker/build-tools/convertI18n.js path/to/i18n
### **WORK IN PROGRESS**
-->
## Changelog
### 1.0.8 (2024-09-21)
* (bluefox) added `patternForWidgetsFiles`
### **WORK IN PROGRESS**
* (bluefox) added `copyWidgetsFiles` and `ignoreWidgetFiles`

### 1.0.7 (2024-09-21)
* (bluefox) Added log outputs
Expand Down
23 changes: 22 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,28 @@ function _patchHtmlFile(fileName: string): boolean {
return changed;
}

export function patternForWidgetsFiles(src: string): string[] {
export function ignoreWidgetFiles(src: string, doNotIgnoreMap?: boolean): string[] {
src = src || './src-widgets/';
if (!src.endsWith('/')) {
src += '/';
}
let list = [
`!${src}build/static/js/node_modules*.*`,
`!${src}build/static/js/vendors-node_modules*.*`,
`!${src}build/static/js/main*.*`,
`!${src}build/static/js/src_bootstrap*.*`,
];
if (!doNotIgnoreMap) {
list = list.concat([
`!${src}build/static/*.map`,
`!${src}build/static/**/*.map`,
]);
}

return list;
}

export function copyWidgetsFiles(src: string): string[] {
src = src || './src-widgets/';
if (!src.endsWith('/')) {
src += '/';
Expand Down

0 comments on commit f01731e

Please sign in to comment.