-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
113 additions
and
158 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { uniq } from '@nx/plugin/testing'; | ||
import { | ||
uniq, | ||
} from '@nx/plugin/testing'; | ||
import { checkFilesExist, createTestProject, readJson, runNxCommandAsync } from '@nxrocks/common/testing'; | ||
checkFilesExist, | ||
createTestProject, | ||
readJson, | ||
runNxCommandAsync, | ||
} from '@nxrocks/common/testing'; | ||
import { execSync } from 'child_process'; | ||
import { rmSync } from 'fs-extra'; | ||
|
||
//jest.mock('enquirer'); // we mock 'enquirer' to bypass the interactive prompt | ||
import * as enquirer from 'enquirer'; | ||
import { getPackageManagerCommand } from '@nx/devkit'; | ||
|
||
describe('nx-flutter e2e', () => { | ||
let projectDirectory: string; | ||
|
@@ -16,24 +20,28 @@ describe('nx-flutter e2e', () => { | |
|
||
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync(`npm install @nxrocks/[email protected]`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
}); | ||
execSync( | ||
`${getPackageManagerCommand().addDev} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
env: process.env, | ||
} | ||
); | ||
}); | ||
|
||
afterAll(() => { | ||
// Cleanup the test project | ||
projectDirectory && rmSync(projectDirectory, { | ||
recursive: true, | ||
force: true, | ||
}); | ||
projectDirectory && | ||
rmSync(projectDirectory, { | ||
recursive: true, | ||
force: true, | ||
}); | ||
}); | ||
|
||
it('should be installed', () => { | ||
// npm ls will fail if the package is not installed properly | ||
execSync('npm ls @nxrocks/nx-flutter', { | ||
execSync(`${getPackageManagerCommand().list} @nxrocks/nx-flutter`, { | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ describe('nx-ktor e2e', () => { | |
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
`${getPackageManagerCommand().addDev} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ describe('nx-melos e2e', () => { | |
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
`${getPackageManagerCommand().addDev} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ describe('nx-micronaut e2e', () => { | |
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
`${getPackageManagerCommand().addDev} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ describe('nx-quarkus e2e', () => { | |
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync( | ||
`${getPackageManagerCommand().add} @nxrocks/[email protected]`, | ||
`${getPackageManagerCommand().addDev} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ describe('nx-spring-boot e2e', () => { | |
// The plugin has been built and published to a local registry in the jest globalSetup | ||
// Install the plugin built with the latest source code into the test repo | ||
execSync( | ||
`${getPackageManagerCommand().install} @nxrocks/[email protected]`, | ||
`${getPackageManagerCommand().addDev} @nxrocks/[email protected]`, | ||
{ | ||
cwd: projectDirectory, | ||
stdio: 'inherit', | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
import { CreateWorkspaceOptions } from 'create-nx-workspace'; | ||
|
||
|
||
export interface CLIArguments extends CreateWorkspaceOptions { | ||
name: string; | ||
useNxWrapper?: boolean; | ||
nxCloud: 'yes' | 'github' | 'circleci' | 'skip'; | ||
interactive: boolean; | ||
verbose: boolean; | ||
$0?: string; | ||
_?: string[] | ||
} | ||
|
||
useNxWrapper?: boolean; | ||
verbose: boolean; | ||
$0?: string; | ||
_?: string[]; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import { ProjectGeneratorOptions } from '../project/schema'; | ||
|
||
export interface PresetGeneratorSchema | ||
extends Omit<ProjectGeneratorOptions, 'name'> { | ||
prjName?: string; // we cannot use "projectName" nor "name" because they have special meanings in Nx | ||
} | ||
export type PresetGeneratorSchema = ProjectGeneratorOptions; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import { ProjectGeneratorOptions } from '../project/schema'; | ||
|
||
export interface PresetGeneratorSchema | ||
extends Omit<ProjectGeneratorOptions, 'name'> { | ||
prjName?: string; // we cannot use "projectName" nor "name" because they have special meanings in Nx | ||
} | ||
export type PresetGeneratorSchema = ProjectGeneratorOptions; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import { ProjectGeneratorOptions } from '../project/schema'; | ||
|
||
export interface PresetGeneratorSchema | ||
extends Omit<ProjectGeneratorOptions, 'name'> { | ||
prjName?: string; // we cannot use "projectName" nor "name" because they have special meanings in Nx | ||
} | ||
export type PresetGeneratorSchema = ProjectGeneratorOptions; |
Oops, something went wrong.