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
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms'; | |
export class WordCountValidators { | |
/** | |
* The Regex used to seperate words from white space characters. | |
*/ | |
private static seperator = /\s+/gmu; | |
/** | |
* @description |
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
// orignal author @dylanvdmerwe - https://dev.to/dylanvdmerwe/reduce-angular-style-size-using-purgecss-to-remove-unused-styles-3b2k | |
const exec = require("child_process").exec; | |
const fs = require("fs"); | |
const path = require("path"); | |
const chalk = require("chalk"); | |
function removeUnusedCSS() { | |
var pathPrefix = process.argv.slice(2)[0]; | |
// find the styles css file | |
const files = getAllFiles(`./${pathPrefix}/`, ".css"); |