Skip to content

Commit fd427fc

Browse files
committed
fix: fix targets avalaible for flutter projects
1 parent e335331 commit fd427fc

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

packages/nx-flutter/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ Here the list of available executors<sup>1</sup>:
154154
| `screenshot` | _see `flutter help screenshot`_ | Take a screenshot from a connected device |
155155
| `symbolize` | _see `flutter help symbolize`_ | Symbolize a stack trace from an AOT-compiled Flutter app |
156156
| `test` | _see `flutter help test`_ | Run Flutter unit tests for the current project |
157-
| `doctor` | _see `flutter help doctor`_ | Run Flutter doctor to check the environment and status of Flutter installation |
158157
159158
<sup>1</sup> : _Actual executors in your `workspace.json` will depend on the type of `flutter` project (`template`), target `platforms` that you choose to generate._
160159

packages/nx-flutter/src/generators/project/generator.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ import { getProjectTypeAndTargetsFromOptions } from '../../utils/plugin-utils';
2020
process.env['NX_INTERACTIVE'] = 'true'; // simulate normal cli interactive mode (the prompt is mocked anyway)
2121

2222
const appCommands = [
23-
{ key: 'assemble', value: 'assemble' },
2423
{ key: 'attach', value: 'attach' },
2524
{ key: 'drive', value: 'drive' },
26-
{ key: 'gen-l10n', value: 'gen-l10n' },
2725
{ key: 'install', value: 'install' },
2826
{ key: 'run', value: 'run' },
2927
];
@@ -77,7 +75,8 @@ describe('application generator', () => {
7775
{ key: 'clean', value: 'clean' },
7876
{ key: 'format', value: `format ${project.root}/*` },
7977
{ key: 'test', value: 'test' },
80-
{ key: 'doctor', value: 'doctor' },
78+
{ key: 'assemble', value: 'assemble' },
79+
{ key: 'gen-l10n', value: 'gen-l10n' },
8180
];
8281

8382
const commands = [
@@ -251,7 +250,6 @@ describe('application generator', () => {
251250
"buildIosTargetName": "build-ios",
252251
"buildIpaTargetName": "build-ipa",
253252
"cleanTargetName": "clean",
254-
"doctorTargetName": "doctor",
255253
"driveTargetName": "drive",
256254
"formatTargetName": "format",
257255
"genL10nTargetName": "gen-l10n",

packages/nx-flutter/src/graph/plugin.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export interface NxFlutterPluginOptions {
66
cleanTargetName?: string;
77
formatTargetName?: string;
88
testTargetName?: string;
9-
doctorTargetName?: string;
109
assembleTargetName?: string;
1110
attachTargetName?: string;
1211
driveTargetName?: string;
@@ -35,7 +34,6 @@ export function normalizePluginOptions(
3534
cleanTargetName: options.cleanTargetName ?? 'clean',
3635
formatTargetName: options.formatTargetName ?? 'format',
3736
testTargetName: options.testTargetName ?? 'test',
38-
doctorTargetName: options.doctorTargetName ?? 'doctor',
3937
assembleTargetName: options.assembleTargetName ?? 'assemble',
4038
attachTargetName: options.attachTargetName ?? 'attach',
4139
driveTargetName: options.driveTargetName ?? 'drive',

packages/nx-flutter/src/utils/plugin-utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,20 @@ function getProjectTypeAndTargets(
6464
const targets = {};
6565
const commands = [
6666
{ key: pluginOptions.analyzeTargetName, value: 'analyze' },
67+
{ key: pluginOptions.assembleTargetName, value: 'assemble' },
6768
{ key: pluginOptions.cleanTargetName, value: 'clean' },
6869
{
6970
key: pluginOptions.formatTargetName,
7071
value: `format ${joinPathFragments(projectRoot, '*')}`,
7172
},
7273
{ key: pluginOptions.testTargetName, value: 'test' },
73-
{ key: pluginOptions.doctorTargetName, value: 'doctor' },
74+
{ key: pluginOptions.genL10nTargetName, value: 'gen-l10n' },
7475
];
7576

7677
if (template === 'app') {
7778
commands.push(
78-
{ key: pluginOptions.assembleTargetName, value: 'assemble' },
7979
{ key: pluginOptions.attachTargetName, value: 'attach' },
8080
{ key: pluginOptions.driveTargetName, value: 'drive' },
81-
{ key: pluginOptions.genL10nTargetName, value: 'gen-l10n' },
8281
{ key: pluginOptions.installTargetName, value: 'install' },
8382
{ key: pluginOptions.runTargetName, value: 'run' }
8483
);

0 commit comments

Comments
 (0)