import{SourceFile}from"file/classes";import{readFile}from"file";importSCSSFilefrom"./scss";importtype{Path}from"../../utils/path";importtype{PageSettings}from"../../types/site";/** * A CSS file on disk. * A CSS file is a source file that can convert from SCSS, etc. */classCSSFileextendsSourceFile{staticfiletypes=["css"];/** * Override the default 'create' behavior. * Potentially create a parent as well. * @param filePath path to the file to create from. */staticcreate(filePath: Path,cfg: PageSettings){if(filePath.exists()){returnnewCSSFile(filePath,cfg);}// If this file doesn't exist, try making the scss fileconstscssPath=filePath.replaceExtension("scss");constprevFile=readFile(scssPath,cfg)asSCSSFile;returnprevFile.css(cfg);}}exportdefaultCSSFile;