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
const path = require('path'); | |
const fs = require('fs'); | |
const APP_MODULES_DIR = 'projects/evo-ui-kit/src/lib/modules'; | |
const APP_COMPONENTS_DIR = 'projects/evo-ui-kit/src/lib/components'; | |
const pascalize = (str) => { | |
return str | |
.replace(/\s(.)/g, (s) => s.toUpperCase() ) | |
.replace(/-(.)/g, (s) => s.toUpperCase() ) | |
.replace(/\s/g, '') |
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
{ | |
"liveSassCompile.settings": { | |
"generateMap": false, | |
"includeItems": [ | |
"./scss/style.scss" | |
], | |
"formats":[ | |
{ | |
"format": "expanded", | |
"extensionName": ".css", |
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
function printElem(selector, width, height) { | |
const newWindow = window.open('', 'PRINT', `height=${height},width=${width}`); | |
const element = document.querySelector(selector); | |
newWindow.document.write(` | |
<html> | |
<head> | |
<title>${document.title}</title> | |
</head> | |
<body>${element.innerHTML}</body> | |
</html>`); |
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
export function enterZone(zone: NgZone) { | |
return <T>(source: Observable<T>) => | |
new Observable<T>(observer => | |
source.subscribe({ | |
next: (x) => zone.run(() => observer.next(x)), | |
error: (err) => observer.error(err), | |
complete: () => observer.complete() | |
}) | |
); | |
} |
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
export class ViewState<T extends object> extends BehaviorSubject<T> { | |
constructor(initialState: T) { | |
super(initialState); | |
} | |
patch(newState: Partial<T>) { | |
this.next({ | |
...this.value, | |
...newState | |
}); |
OlderNewer