diff --git a/docs/generated/packages/plugin/generators/create-package.json b/docs/generated/packages/plugin/generators/create-package.json index 86536d0fe16bb..a03ad25f3f4a3 100644 --- a/docs/generated/packages/plugin/generators/create-package.json +++ b/docs/generated/packages/plugin/generators/create-package.json @@ -66,9 +66,7 @@ "e2eProject": { "type": "string", "description": "The name of the e2e project.", - "alias": "p", - "$default": { "$source": "projectName" }, - "x-prompt": "What is the name of the e2e project?" + "x-prompt": "What is the name of the e2e project? Leave blank to skip e2e tests" } }, "required": ["name", "project"], diff --git a/e2e/plugin/src/nx-plugin.test.ts b/e2e/plugin/src/nx-plugin.test.ts index 9264ff6020461..488089b712ad9 100644 --- a/e2e/plugin/src/nx-plugin.test.ts +++ b/e2e/plugin/src/nx-plugin.test.ts @@ -423,6 +423,26 @@ describe('Nx Plugin', () => { }, 90000); }); + it('should be able to generate a create-package plugin without e2e tests', async () => { + const plugin = uniq('plugin'); + const createAppName = `create-${plugin}-app`; + runCLI( + `generate @nx/plugin:plugin ${plugin} --e2eTestRunner jest --publishable` + ); + runCLI( + `generate @nx/plugin:create-package ${createAppName} --project=${plugin}` + ); + + const buildResults = runCLI(`build ${createAppName}`); + expect(buildResults).toContain('Done compiling TypeScript files'); + + checkFilesExist( + `libs/${plugin}/src/generators/preset`, + `libs/${createAppName}`, + `dist/libs/${createAppName}/bin/index.js` + ); + }); + it('should be able to generate a create-package plugin ', async () => { const plugin = uniq('plugin'); const createAppName = `create-${plugin}-app`; @@ -449,7 +469,7 @@ describe('Nx Plugin', () => { const plugin = uniq('plugin'); expect(() => runCLI( - `generate @nx/plugin:create-package ${plugin} --project=invalid-plugin` + `generate @nx/plugin:create-package create-${plugin} --project=invalid-plugin` ) ).toThrow(); }); diff --git a/packages/plugin/src/generators/create-package/schema.json b/packages/plugin/src/generators/create-package/schema.json index 8b33ac75b0a36..5bd26ec53a78d 100644 --- a/packages/plugin/src/generators/create-package/schema.json +++ b/packages/plugin/src/generators/create-package/schema.json @@ -68,11 +68,7 @@ "e2eProject": { "type": "string", "description": "The name of the e2e project.", - "alias": "p", - "$default": { - "$source": "projectName" - }, - "x-prompt": "What is the name of the e2e project?" + "x-prompt": "What is the name of the e2e project? Leave blank to skip e2e tests" } }, "required": ["name", "project"]