ngx-heroicons
Version:
A modern, type-safe, and accessible Heroicons component library for Angular with inline SVGs and Tailwind support.
26 lines (22 loc) โข 747 B
text/typescript
import {
addPackageJsonDependency,
NodeDependencyType,
} from '@schematics/angular/utility/dependencies';
import {
Rule,
SchematicContext,
Tree,
} from '@angular-devkit/schematics';
import { version } from '../../package.json';
export function ngAdd(): Rule {
return (tree: Tree, context: SchematicContext) => {
addPackageJsonDependency(tree, {
type: NodeDependencyType.Default,
name: 'ngx-heroicons',
version: `^${version}`,
});
context.logger.info('โ
Added ngx-heroicons to package.json');
context.logger.info('๐ Donโt forget to import the component in your module or standalone view.');
return tree;
};
}