Skip to content

Commit

Permalink
feat(design): register watch mode to design ngAdd
Browse files Browse the repository at this point in the history
  • Loading branch information
kpanot committed Jan 19, 2024
1 parent 591622f commit 00c098b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ export const registerGenerateCssBuilder = (projectName?: string, taskName = 'gen
const workspaceProject = projectName ? getWorkspaceConfig(tree)?.projects[projectName] : undefined;
const srcBasePath = workspaceProject?.sourceRoot || (workspaceProject?.root ? posix.resolve(workspaceProject.root, 'src') : '');
const themeFile = posix.resolve(srcBasePath, 'style', 'theme.scss');
const taskParameters: GenerateCssSchematicsSchema = {
const taskOptions: GenerateCssSchematicsSchema = {
defaultStyleFile: themeFile,
renderPrivateVariableTo: 'sass',
designTokenFilePatterns: [
`${posix.resolve(srcBasePath, 'style', '*.json')}`,
`${posix.resolve(srcBasePath, '**', '*.theme.json')}`
]
};
const taskParameters = {
options: taskOptions,
configuration: {
watch: { watch: true }
}
};
if (!workspaceProject) {
logger.warn(`No angular.json found, the task ${taskName} will not be created`);
return tree;
Expand Down

0 comments on commit 00c098b

Please sign in to comment.