File tree Expand file tree Collapse file tree 3 files changed +27
-9
lines changed Expand file tree Collapse file tree 3 files changed +27
-9
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "DEBUG" : false ,
3
+ "USE_PROXY" : false ,
4
+ "PROXY_PORT" : 8888 ,
5
+ "PROXY_HOSTNAME" : " 127.0.0.1" ,
6
+ "TYPESCRIPT_COMPILER_OPTIONS" : {},
7
+ "CI_LOGGER" : false
8
+ }
Original file line number Diff line number Diff line change 4
4
import path = require( "path" ) ;
5
5
import util = require( "util" ) ;
6
6
import staticConfigBaseLibPath = require( "./common/static-config-base" ) ;
7
+ import configBaseLib = require( "./common/config-base" ) ;
7
8
8
- $injector . register ( "config" , {
9
- CI_LOGGER : false ,
10
- DEBUG : process . env . NATIVESCRIPT_DEBUG ,
11
- TYPESCRIPT_COMPILER_OPTIONS : { }
12
- } ) ;
9
+ export class Configuration extends configBaseLib . ConfigBase implements IConfiguration { // User specific config
10
+ CI_LOGGER = false ;
11
+ DEBUG = false ;
12
+ TYPESCRIPT_COMPILER_OPTIONS = { } ;
13
+ USE_PROXY = false ;
14
+
15
+ /*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
16
+ constructor ( protected $fs : IFileSystem ) {
17
+ super ( $fs ) ;
18
+ _ . extend ( this , this . loadConfig ( "config" ) . wait ( ) ) ;
19
+ }
20
+ }
21
+ $injector . register ( "config" , Configuration ) ;
13
22
14
23
export class StaticConfig extends staticConfigBaseLibPath . StaticConfigBase implements IStaticConfig {
15
24
public PROJECT_FILE_NAME = ".tnsproject" ;
Original file line number Diff line number Diff line change @@ -8,11 +8,12 @@ import Future = require("fibers/future");
8
8
import errors = require( "./common/errors" ) ;
9
9
errors . installUncaughtExceptionListener ( ) ;
10
10
11
- var config = < Config . IConfig > $injector . resolve ( "$config" ) ;
12
- ( < IErrors > $injector . resolve ( "$errors" ) ) . printCallStack = config . DEBUG ;
13
-
14
11
fiber ( ( ) => {
15
- var commandDispatcher : ICommandDispatcher = $injector . resolve ( "commandDispatcher" ) ;
12
+ var config = < Config . IConfig > $injector . resolve ( "$config" ) ;
13
+ var err = < IErrors > $injector . resolve ( "$errors" ) ;
14
+ err . printCallStack = config . DEBUG ;
15
+
16
+ var commandDispatcher : ICommandDispatcher = $injector . resolve ( "commandDispatcher" ) ;
16
17
17
18
if ( process . argv [ 2 ] === "completion" ) {
18
19
commandDispatcher . completeCommand ( ) . wait ( ) ;
You can’t perform that action at this time.
0 commit comments