Created
December 28, 2021 15:02
-
-
Save IKatsuba/d505bfc17b6c5954918b9b87d9e917b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rule: Rule = (tree: Tree, context: SchematicContext): void => { | |
setActiveProject(createProject(tree)); | |
const appModule = getMainModule('src/main.ts'); | |
addImportToNgModule(appModule, 'SomeModule'); | |
addImports(appModule.getFilePath(), {moduleSpecifier: '@some/package', namedExports: ['SomeModule']}) | |
saveActiveProject(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment