Example #1
0
/**
 * Returns true if project uses SASS stylesheets, false otherwise.
 */
function hasSassStylesheet(host: Tree) {
  let hasSass = false;
  // The proper extension for SASS is .scss
  host.visit((file: string) => { hasSass = hasSass || file.endsWith('.scss'); });
  return hasSass;
}
Example #2
0
/**
 * Returns true if project contains routing module, false otherwise.
 */
function hasRoutingModule(host: Tree) {
  let hasRouting = false;
  host.visit((file: string) => { hasRouting = hasRouting || file.endsWith('-routing.module.ts'); });
  return hasRouting;
}