src/core/base/wnModule.js
function (file)
		{
			if (!_.isString(file))
				return false;

			var file = file+'';
			this.e.log&&this.e.log('Loading module configuration from file: '+file,'system');
			if (fs.statSync(file).isFile() && path.extname(file) == '.json')
			{
				var _data = (fs.readFileSync(file,'utf8').toString())
							.replace(/\\/g,function () { return "\\"+arguments[0]; })
							.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,'');
				if(_data = JSON.parse(_data))
				{
					this.setConfig(_data,true);
					return true;
				}
			}
			return false;
		
		}
function (file)
		{
			if (!_.isString(file))
				return false;

			var file = file+'';
			this.e.log&&this.e.log('Loading module configuration from file: '+file,'system');
			if (fs.statSync(file).isFile() && path.extname(file) == '.json')
			{
				var _data = (fs.readFileSync(file,'utf8').toString())
							.replace(/\\/g,function () { return "\\"+arguments[0]; })
							.replace(/\/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\//g,'');
				if(_data = JSON.parse(_data))
				{
					this.setConfig(_data,true);
					return true;
				}
			}
			return false;
		
		}
function ( file ) { if ( ! _ . isString ( file ) ) return false ; var file = file + '' ; this . e . log && this . e . log ( 'Loading module configuration from file: ' + file , 'system' ) ; if ( fs . statSync ( file ) . isFile ( ) && path . extname ( file ) == '.json' ) { var _data = ( fs . readFileSync ( file , 'utf8' ) . toString ( ) ) . replace ( / \\ / g , function ( ) { return "\\" + arguments [ 0 ] ; } ) . replace ( / \/\/.+?(?=\n|\r|$)|\/\*[\s\S]+?\*\/ / g , '' ) ; if ( _data = JSON . parse ( _data ) ) { this . setConfig ( _data , true ) ; return true ; } } return false ; }
Get a JSON configuration from file then send it to the `setConfig`
@param string $file path to the file
@return boolean success?
Get a JSON configuration from file then send it to the setConfig