Skip to content

Commit 971ded8

Browse files
authored
chore(): clean up lingering ionic v1 and v3 refs (#5001)
1 parent 8e04c8e commit 971ded8

File tree

11 files changed

+15
-182
lines changed

11 files changed

+15
-182
lines changed

packages/@ionic/cli/src/commands/monitoring/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export class MonitoringNamespace extends Namespace {
66
async getMetadata() {
77
const groups: MetadataGroup[] = [];
88

9-
if (!this.project || this.project.type !== 'ionic-angular') {
10-
groups.push(MetadataGroup.HIDDEN);
11-
}
9+
groups.push(MetadataGroup.HIDDEN);
1210

1311
return {
1412
name: 'monitoring',

packages/@ionic/cli/src/commands/start.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,17 @@ The second argument is the ${input(
9494
9595
Use the ${input(
9696
'--type'
97-
)} option to start projects using older versions of Ionic. For example, you can start an Ionic 3 project with ${input(
98-
'--type=ionic-angular'
99-
)}. Use ${input('--list')} to see all project types and templates.
97+
)} option to start projects using a different JavaScript Framework. Use ${input(
98+
'--list'
99+
)} to see all project types and templates.
100100
`,
101101
exampleCommands: [
102102
'',
103103
'--list',
104104
'myApp',
105105
'myApp blank',
106106
'myApp tabs --capacitor',
107+
'myApp list --type=vue',
107108
'"My App" blank',
108109
'"Conference App" https://github.com/ionic-team/ionic-conference-app',
109110
],

packages/@ionic/cli/src/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export const ASSETS_DIRECTORY = path.resolve(__dirname, 'assets');
88
export const ANGULAR_STANDALONE = 'angular-standalone';
99

1010
export const PROJECT_FILE = process.env['IONIC_CONFIG_FILE'] ?? 'ionic.config.json';
11-
export const PROJECT_TYPES: ProjectType[] = ['angular', ANGULAR_STANDALONE, 'react', 'vue', 'ionic-angular', 'ionic1', 'custom', 'vue-vite', 'react-vite'];
12-
export const LEGACY_PROJECT_TYPES: ProjectType[] = ['ionic-angular', 'ionic1'];
11+
export const PROJECT_TYPES: ProjectType[] = ['angular', ANGULAR_STANDALONE, 'react', 'vue', 'custom', 'vue-vite', 'react-vite'];
12+
export const LEGACY_PROJECT_TYPES: ProjectType[] = [];
1313
export const MODERN_PROJECT_TYPES: ProjectType[] = lodash.difference(PROJECT_TYPES, LEGACY_PROJECT_TYPES);
1414

1515
export const COLUMNAR_OPTIONS = { hsep: chalk.dim('-'), vsep: chalk.dim('|') };

packages/@ionic/cli/src/definitions.ts

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export interface Runner<T extends object, U> {
7878
run(options: T): Promise<U>;
7979
}
8080

81-
export type ProjectType = 'angular' | 'angular-standalone' | 'ionic-angular' | 'ionic1' | 'custom' | 'bare' | 'react' | 'vue' | 'react-vite' | 'vue-vite';
81+
export type ProjectType = 'angular' | 'angular-standalone' | 'custom' | 'bare' | 'react' | 'vue' | 'react-vite' | 'vue-vite';
8282
export type HookName = 'build:before' | 'build:after' | 'serve:before' | 'serve:after' | 'capacitor:run:before' | 'capacitor:build:before' | 'capacitor:sync:after';
8383

8484
export type CapacitorRunHookName = 'capacitor:run:before';
@@ -95,8 +95,8 @@ export interface BaseHookContext {
9595
env: NodeJS.ProcessEnv;
9696
}
9797

98-
export type AnyServeOptions = ReactServeOptions | AngularServeOptions | IonicAngularServeOptions | Ionic1ServeOptions;
99-
export type AnyBuildOptions = ReactBuildOptions | AngularBuildOptions | IonicAngularBuildOptions | Ionic1BuildOptions;
98+
export type AnyServeOptions = ReactServeOptions | AngularServeOptions;
99+
export type AnyBuildOptions = ReactBuildOptions | AngularBuildOptions;
100100

101101
export interface CapacitorSyncHookInput {
102102
readonly name: CapacitorSyncHookName;
@@ -118,17 +118,17 @@ export interface CapacitorBuildHookInput {
118118

119119
export interface BuildHookInput {
120120
readonly name: 'build:before' | 'build:after';
121-
readonly build: AngularBuildOptions | IonicAngularBuildOptions | Ionic1BuildOptions;
121+
readonly build: AngularBuildOptions;
122122
}
123123

124124
export interface ServeBeforeHookInput {
125125
readonly name: 'serve:before';
126-
readonly serve: AngularServeOptions | IonicAngularServeOptions | Ionic1ServeOptions;
126+
readonly serve: AngularServeOptions;
127127
}
128128

129129
export interface ServeAfterHookInput {
130130
readonly name: 'serve:after';
131-
readonly serve: (AngularServeOptions | IonicAngularServeOptions | Ionic1ServeOptions) & ServeDetails;
131+
readonly serve: (AngularServeOptions) & ServeDetails;
132132
}
133133

134134
export type HookInput = BuildHookInput | ServeBeforeHookInput | ServeAfterHookInput | CapacitorRunHookInput | CapacitorBuildHookInput | CapacitorSyncHookInput;
@@ -674,18 +674,6 @@ export interface IonicCapacitorOptions extends CapacitorConfig {
674674
verbose?: boolean;
675675
}
676676

677-
export interface IonicAngularBuildOptions extends BuildOptions<'ionic-angular'> {
678-
prod: boolean;
679-
sourcemaps?: boolean;
680-
aot: boolean;
681-
minifyjs: boolean;
682-
minifycss: boolean;
683-
optimizejs: boolean;
684-
env?: string;
685-
}
686-
687-
export interface Ionic1BuildOptions extends BuildOptions<'ionic1'> {}
688-
689677
export interface CustomBuildOptions extends BuildOptions<'custom'> {}
690678

691679
export interface GenerateOptions {
@@ -744,22 +732,6 @@ export interface VueServeOptions extends ServeOptions {
744732
sourcemaps?: boolean;
745733
}
746734

747-
export interface IonicAngularServeOptions extends ServeOptions {
748-
sourcemaps?: boolean;
749-
consolelogs: boolean;
750-
serverlogs: boolean;
751-
env?: string;
752-
livereloadPort: number;
753-
notificationPort: number;
754-
}
755-
756-
export interface Ionic1ServeOptions extends ServeOptions {
757-
consolelogs: boolean;
758-
serverlogs: boolean;
759-
livereloadPort: number;
760-
notificationPort: number;
761-
}
762-
763735
export interface CustomServeOptions extends ServeOptions {}
764736

765737
export interface LabServeDetails {

packages/@ionic/cli/src/lib/integrations/cordova/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FatalException } from '../../errors';
77
import { prettyProjectName } from '../../project';
88
import { emoji } from '../../utils/emoji';
99

10-
export const SUPPORTED_PROJECT_TYPES: readonly ProjectType[] = ['custom', 'ionic1', 'ionic-angular', 'angular'];
10+
export const SUPPORTED_PROJECT_TYPES: readonly ProjectType[] = ['custom', 'angular'];
1111

1212
/**
1313
* Filter and gather arguments from command line to be passed to Cordova

packages/@ionic/cli/src/lib/project/common.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

packages/@ionic/cli/src/lib/project/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ export class ProjectDetails {
225225
log.warn(
226226
`Could not determine project type (project config: ${strong(prettyPath(result.configPath))}).\n` +
227227
`- ${wordWrap(`For ${strong(prettyProjectName('angular'))} projects, make sure ${input('@ionic/angular')} is listed as a dependency in ${strong('package.json')}.`, listWrapOptions)}\n` +
228-
`- ${wordWrap(`For ${strong(prettyProjectName('ionic-angular'))} projects, make sure ${input('ionic-angular')} is listed as a dependency in ${strong('package.json')}.`, listWrapOptions)}\n` +
229-
`- ${wordWrap(`For ${strong(prettyProjectName('ionic1'))} projects, make sure ${input('ionic')} is listed as a dependency in ${strong('bower.json')}.`, listWrapOptions)}\n\n` +
230228
`Alternatively, set ${strong('type')} attribute in ${strong(prettyPath(result.configPath))} to one of: ${PROJECT_TYPES.map(v => input(v)).join(', ')}.\n\n` +
231229
`If the Ionic CLI does not know what type of project this is, ${input('ionic build')}, ${input('ionic serve')}, and other commands may not work. You can use the ${input('custom')} project type if that's okay.`
232230
);
@@ -781,10 +779,6 @@ export function prettyProjectName(type?: string): string {
781779
return '@ionic/react';
782780
} else if (type === 'vue') {
783781
return '@ionic/vue';
784-
} else if (type === 'ionic-angular') {
785-
return 'Ionic 2/3';
786-
} else if (type === 'ionic1') {
787-
return 'Ionic 1';
788782
} else if (type === 'custom') {
789783
return 'Custom';
790784
}

packages/@ionic/cli/src/lib/start.ts

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -343,76 +343,4 @@ export const STARTER_TEMPLATES: StarterTemplate[] = [
343343
description: 'A starting project with a simple tabbed interface',
344344
id: 'react-vite-official-tabs',
345345
},
346-
// Old Ionic V3
347-
{
348-
name: 'tabs',
349-
projectType: 'ionic-angular',
350-
type: 'managed',
351-
description: 'A starting project with a simple tabbed interface',
352-
id: 'ionic-angular-official-tabs',
353-
},
354-
{
355-
name: 'sidemenu',
356-
projectType: 'ionic-angular',
357-
type: 'managed',
358-
description: 'A starting project with a side menu with navigation in the content area',
359-
id: 'ionic-angular-official-sidemenu',
360-
},
361-
{
362-
name: 'blank',
363-
projectType: 'ionic-angular',
364-
type: 'managed',
365-
description: 'A blank starter project',
366-
id: 'ionic-angular-official-blank',
367-
},
368-
{
369-
name: 'super',
370-
projectType: 'ionic-angular',
371-
type: 'managed',
372-
description: 'A starting project complete with pre-built pages, providers and best practices for Ionic development.',
373-
id: 'ionic-angular-official-super',
374-
},
375-
{
376-
name: 'tutorial',
377-
projectType: 'ionic-angular',
378-
type: 'managed',
379-
description: 'A tutorial based project that goes along with the Ionic documentation',
380-
id: 'ionic-angular-official-tutorial',
381-
},
382-
{
383-
name: 'aws',
384-
projectType: 'ionic-angular',
385-
type: 'managed',
386-
description: 'AWS Mobile Hub Starter',
387-
id: 'ionic-angular-official-aws',
388-
},
389-
// Older Ionic V1
390-
{
391-
name: 'tabs',
392-
projectType: 'ionic1',
393-
type: 'managed',
394-
description: 'A starting project for Ionic using a simple tabbed interface',
395-
id: 'ionic1-official-tabs',
396-
},
397-
{
398-
name: 'sidemenu',
399-
projectType: 'ionic1',
400-
type: 'managed',
401-
description: 'A starting project for Ionic using a side menu with navigation in the content area',
402-
id: 'ionic1-official-sidemenu',
403-
},
404-
{
405-
name: 'blank',
406-
projectType: 'ionic1',
407-
type: 'managed',
408-
description: 'A blank starter project for Ionic',
409-
id: 'ionic1-official-blank',
410-
},
411-
{
412-
name: 'maps',
413-
projectType: 'ionic1',
414-
type: 'managed',
415-
description: 'An Ionic starter project using Google Maps and a side menu',
416-
id: 'ionic1-official-maps',
417-
},
418346
];

packages/cli-scripts/projects/ionic-angular/ionic.config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/cli-scripts/projects/ionic1/ionic.config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/cli-scripts/src/docs/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class DocsCommand extends Command {
2525
await remove(STAGING_DIRECTORY);
2626
await mkdirp(STAGING_DIRECTORY);
2727

28-
const projectTypes: ProjectType[] = ['angular', 'ionic-angular', 'ionic1'];
28+
const projectTypes: ProjectType[] = ['angular'];
2929
const baseCtx = await generateContext();
3030

3131
for (const projectType of projectTypes) {

0 commit comments

Comments
 (0)