File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
packages/ionic/src/lib/project Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,6 @@ describe('ionic', () => {
20
20
expect ( result ) . toEqual ( path . resolve ( '/path/to/proj/src' ) ) ;
21
21
} ) ;
22
22
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
-
30
23
} ) ;
31
24
32
25
} ) ;
Original file line number Diff line number Diff line change @@ -254,8 +254,8 @@ export abstract class Project implements IProject {
254
254
return 'https://ionicframework.com/docs' ;
255
255
}
256
256
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' ) ;
259
259
}
260
260
261
261
async getDistDir ( ) : Promise < string > {
Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ export class Ionic1Project extends Project {
72
72
return false ;
73
73
}
74
74
75
+ async getSourceDir ( ) : Promise < string > {
76
+ return this . getDistDir ( ) ; // ionic1's source directory is the dist directory
77
+ }
78
+
75
79
async getDocsUrl ( ) : Promise < string > {
76
80
return 'https://ionicframework.com/docs/v1/' ;
77
81
}
You can’t perform that action at this time.
0 commit comments