Skip to content

Commit

Permalink
fix: repair add-destroy schematic
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi committed Mar 6, 2021
1 parent 523d44e commit fdb773c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/test-schematics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ npm run clean
npx lint-staged
npx tsc --project tsconfig.all.json

npx ng g add-destroy src/app/extensions/awesome/shared/dummy/dummy.component.ts
grep destroy src/app/extensions/awesome/shared/dummy/dummy.component.ts

npm run build

nohup bash -c "npm run serve &"
Expand Down
1 change: 1 addition & 0 deletions schematics/src/utils/ts-morph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export function createTsMorphProject(host: Tree) {
directoryExistsSync: p => host.exists(p) || existsSync(p),
fileExistsSync: p => host.exists(p) || existsSync(p),
readFileSync: (p, encoding) => (host.read(p) || readFileSync(p)).toString(encoding as BufferEncoding),
readDirSync: dirPath => host.getDir(dirPath).subfiles.map(sf => sf as string),
} as FileSystemHost,
});
}

1 comment on commit fdb773c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure Demo Servers are available:

Please sign in to comment.