@@ -191,11 +191,11 @@ Config.prototype.loadExternalContractsFiles = function() {
191191 if ( contract . file . startsWith ( 'http' ) || contract . file . startsWith ( 'git' ) ) {
192192 const url = this . getExternalContractUrl ( contract ) ;
193193 const localFile = httpContractDir + path . basename ( url ) ;
194- this . contractsFiles . push ( new File ( { filename : localFile , type : " http" , basedir : '' , path : url } ) ) ;
194+ this . contractsFiles . push ( new File ( { filename : localFile , type : File . types . http , basedir : '' , path : url } ) ) ;
195195 } else if ( fs . existsSync ( contract . file ) ) {
196- this . contractsFiles . push ( new File ( { filename : contract . file , type : " dapp_file" , basedir : '' , path : contract . file } ) ) ;
196+ this . contractsFiles . push ( new File ( { filename : contract . file , type : File . types . dapp_file , basedir : '' , path : contract . file } ) ) ;
197197 } else if ( fs . existsSync ( path . join ( './node_modules/' , contract . file ) ) ) {
198- this . contractsFiles . push ( new File ( { filename : path . join ( './node_modules/' , contract . file ) , type : " dapp_file" , basedir : '' , path : path . join ( './node_modules/' , contract . file ) } ) ) ;
198+ this . contractsFiles . push ( new File ( { filename : path . join ( './node_modules/' , contract . file ) , type : File . types . dapp_file , basedir : '' , path : path . join ( './node_modules/' , contract . file ) } ) ) ;
199199 } else {
200200 this . logger . error ( "contract file not found: " + contract . file ) ;
201201 }
@@ -302,7 +302,7 @@ Config.prototype.loadFiles = function(files) {
302302 return ( file [ 0 ] === '$' || file . indexOf ( '.' ) >= 0 ) ;
303303 } ) . filter ( function ( file ) {
304304 let basedir = findMatchingExpression ( file , files ) ;
305- readFiles . push ( new File ( { filename : file , type : " dapp_file" , basedir : basedir , path : file } ) ) ;
305+ readFiles . push ( new File ( { filename : file , type : File . types . dapp_file , basedir : basedir , path : file } ) ) ;
306306 } ) ;
307307
308308 var filesFromPlugins = [ ] ;
@@ -335,7 +335,7 @@ Config.prototype.loadPluginContractFiles = function() {
335335 contractsPlugins . forEach ( function ( plugin ) {
336336 plugin . contractsFiles . forEach ( function ( file ) {
337337 var filename = file . replace ( './' , '' ) ;
338- self . contractsFiles . push ( new File ( { filename : filename , type : ' custom' , resolver : function ( callback ) {
338+ self . contractsFiles . push ( new File ( { filename : filename , type : File . types . custom , resolver : function ( callback ) {
339339 callback ( plugin . loadPluginFile ( file ) ) ;
340340 } } ) ) ;
341341 } ) ;
0 commit comments