MCPcopy Create free account
hub / github.com/angularcafe/slateui / init

Function init

projects/cli/schematics/init/index.ts:5–28  ·  view source on GitHub ↗
(options: Schema)

Source from the content-addressed store, hash-verified

3import { validateProject, validateBaseColor, installDependencies, setupTailwind, setupImportAliases } from './rules';
4
5export function init(options: Schema): Rule {
6 return chain([
7 (tree: Tree, context: SchematicContext) => {
8 const baseColor = options.baseColor || 'neutral';
9 const project = options.project;
10
11 // Log the user selections
12 context.logger.info('SlateUI Initialization Started');
13 context.logger.info(`Project: ${project || '(default)'}`);
14 context.logger.info(`Base Color: ${baseColor}`);
15
16 return tree;
17 },
18 validateProject({ project: options.project }),
19 validateBaseColor({ baseColor: options.baseColor || 'neutral' }),
20 installDependencies(),
21 setupTailwind({
22 project: options.project,
23 baseColor: options.baseColor || 'neutral',
24 confirmOverwrite: options.confirmOverwrite
25 }),
26 setupImportAliases(),
27 ]);
28}

Callers

nothing calls this directly

Calls 5

validateProjectFunction · 0.90
validateBaseColorFunction · 0.90
installDependenciesFunction · 0.90
setupTailwindFunction · 0.90
setupImportAliasesFunction · 0.90

Tested by

no test coverage detected