-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generate): add option to auto-export declarations (#3876)
Fixes #3778
- Loading branch information
Showing
8 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
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
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
14 changes: 14 additions & 0 deletions
14
tests/e2e/tests/generate/component/component-module-export.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {join} from 'path'; | ||
import {ng} from '../../../utils/process'; | ||
import {expectFileToMatch} from '../../../utils/fs'; | ||
|
||
|
||
export default function() { | ||
const modulePath = join('src', 'app', 'app.module.ts'); | ||
|
||
return ng('generate', 'component', 'test-component', '--export') | ||
.then(() => expectFileToMatch(modulePath, 'exports: [TestComponentComponent]')) | ||
|
||
// Try to run the unit tests. | ||
.then(() => ng('test', '--single-run')); | ||
} |
14 changes: 14 additions & 0 deletions
14
tests/e2e/tests/generate/directive/directive-module-export.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {join} from 'path'; | ||
import {ng} from '../../../utils/process'; | ||
import {expectFileToMatch} from '../../../utils/fs'; | ||
|
||
|
||
export default function() { | ||
const modulePath = join('src', 'app', 'app.module.ts'); | ||
|
||
return ng('generate', 'directive', 'test-directive', '--export') | ||
.then(() => expectFileToMatch(modulePath, 'exports: [TestDirectiveDirective]')) | ||
|
||
// Try to run the unit tests. | ||
.then(() => ng('test', '--single-run')); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {join} from 'path'; | ||
import {ng} from '../../../utils/process'; | ||
import {expectFileToMatch} from '../../../utils/fs'; | ||
|
||
|
||
export default function() { | ||
const modulePath = join('src', 'app', 'app.module.ts'); | ||
|
||
return ng('generate', 'pipe', 'test-pipe', '--export') | ||
.then(() => expectFileToMatch(modulePath, 'exports: [TestPipePipe]')) | ||
|
||
// Try to run the unit tests. | ||
.then(() => ng('test', '--single-run')); | ||
} |