-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(misc): conditionally allow starter template inclusion (#14268)
Co-authored-by: Colum Ferry <cferry09@gmail.com>
- Loading branch information
1 parent
dba4a06
commit ee909cf
Showing
23 changed files
with
275 additions
and
859 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
20 changes: 20 additions & 0 deletions
20
packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap
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
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
107 changes: 107 additions & 0 deletions
107
packages/react/src/generators/application/__snapshots__/application.spec.ts.snap
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,107 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`app --minimal should create default application without Nx welcome component 1`] = ` | ||
" | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import styles from './app.module.css'; | ||
export function App() { | ||
return ( | ||
<> | ||
<h1> | ||
<span> Hello there, </span> | ||
Welcome plain 👋 | ||
</h1> | ||
<div /> | ||
</>); | ||
} | ||
export default App; | ||
if (import.meta.vitest) { | ||
// add tests related to your file here | ||
// For more information please visit the Vitest docs site here: https://vitest.dev/guide/in-source.html | ||
const { it, expect, beforeEach } = import.meta.vitest; | ||
let render: any; | ||
beforeEach(async () => { | ||
render = (await import('@testing-library/react')).render; | ||
}); | ||
it('should render successfully', () => { | ||
const { baseElement } = render(<App />); | ||
expect(baseElement).toBeTruthy(); | ||
}); | ||
it('should have a greeting as the title', () => { | ||
const { getByText } = render(<App />); | ||
expect(getByText(/Welcome plain/gi)).toBeTruthy(); | ||
}); | ||
} | ||
" | ||
`; | ||
|
||
exports[`app not nested should generate files 1`] = ` | ||
" | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import styles from './app.module.css'; | ||
import NxWelcome from \\"./nx-welcome\\"; | ||
export function App() { | ||
return ( | ||
<> | ||
<NxWelcome title=\\"my-app\\"/> | ||
<div /> | ||
</>); | ||
} | ||
export default App; | ||
" | ||
`; | ||
|
||
exports[`app should create Nx specific template 1`] = ` | ||
" | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import styles from './app.module.css'; | ||
import NxWelcome from \\"./nx-welcome\\"; | ||
export function App() { | ||
return ( | ||
<> | ||
<NxWelcome title=\\"my-dir-my-app\\"/> | ||
<div /> | ||
</>); | ||
} | ||
export default App; | ||
" | ||
`; |
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
Oops, something went wrong.
ee909cf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-five.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app