Skip to content

Commit 826b9ae

Browse files
committed
fix(doctor): fix viewport-fit-not-set for ionic1
fixes #3665
1 parent 9aede4f commit 826b9ae

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

packages/ionic/src/lib/project/angular/__tests__/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ describe('ionic', () => {
2020
expect(result).toEqual(path.resolve('/path/to/proj/src'));
2121
});
2222

23-
it('should should set the src root relative to the project root', async () => {
24-
const sourceRoot = 'relative/path/to/src';
25-
const p = new AngularProject('/path/to/proj/file', undefined, {});
26-
const result = await p.getSourceDir(sourceRoot);
27-
expect(result).toEqual(path.resolve(`/path/to/proj/${sourceRoot}`));
28-
});
29-
3023
});
3124

3225
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ export abstract class Project implements IProject {
254254
return 'https://ionicframework.com/docs';
255255
}
256256

257-
async getSourceDir(sourceRoot = 'src'): Promise<string> {
258-
return path.resolve(this.directory, sourceRoot);
257+
async getSourceDir(): Promise<string> {
258+
return path.resolve(this.directory, 'src');
259259
}
260260

261261
async getDistDir(): Promise<string> {

packages/ionic/src/lib/project/ionic1/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export class Ionic1Project extends Project {
7272
return false;
7373
}
7474

75+
async getSourceDir(): Promise<string> {
76+
return this.getDistDir(); // ionic1's source directory is the dist directory
77+
}
78+
7579
async getDocsUrl(): Promise<string> {
7680
return 'https://ionicframework.com/docs/v1/';
7781
}

0 commit comments

Comments
 (0)