File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
name : 'ng2' ,
8
8
9
9
config : function ( ) {
10
- this . project . config = this . project . config || config . CliConfig . fromProject ( ) ;
10
+ this . project . ngConfig = this . project . ngConfig || config . CliConfig . fromProject ( ) ;
11
11
} ,
12
12
13
13
includedCommands : function ( ) {
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ export class CliConfig {
35
35
throw new Error ( `Config file does not exits.` ) ;
36
36
}
37
37
} else {
38
- this . _config = this . _fromProject ( ) ;
38
+ this . _config = CliConfig . fromProject ( ) ;
39
39
}
40
40
}
41
41
42
- save ( path : string = this . _configFilePath ( ) ) {
42
+ save ( path : string = CliConfig . _configFilePath ( ) ) {
43
43
if ( ! path ) {
44
44
throw new Error ( 'Could not find config path.' ) ;
45
45
}
@@ -157,16 +157,16 @@ export class CliConfig {
157
157
return { parent, name } ;
158
158
}
159
159
160
- private _configFilePath ( projectPath ?: string ) : string {
160
+ private static _configFilePath ( projectPath ?: string ) : string {
161
161
// Find the configuration, either where specified, in the angular-cli project
162
162
// (if it's in node_modules) or from the current process.
163
163
return ( projectPath && _findUp ( CLI_CONFIG_FILE_NAME , projectPath ) )
164
164
|| _findUp ( CLI_CONFIG_FILE_NAME , __dirname )
165
165
|| _findUp ( CLI_CONFIG_FILE_NAME , process . cwd ( ) ) ;
166
166
}
167
167
168
- private _fromProject ( ) : any {
169
- const configPath = this . _configFilePath ( ) ;
168
+ public static fromProject ( ) : any {
169
+ const configPath = CliConfig . _configFilePath ( ) ;
170
170
return configPath ? require ( configPath ) : { } ;
171
171
}
172
172
}
You can’t perform that action at this time.
0 commit comments