compiler.js
function compileFile( sourceBundle, bundleFile, config, callback ) {
	var fname = sourceBundle + "/bundle.json";
	fs.readFile(fname, 'utf8', function (err,data) {
		if (err) {
			console.error("Unable to load file",fname);
			if (callback) callback( err, null );
			return;
		}

		// Update path if missing
		if (!config['path'])
			config['path'] = path.dirname( sourceBundle );

		// Compile
		compile( JSON.parse(data), bundleFile, config, callback );

	});
}
function compileFile( sourceBundle, bundleFile, config, callback ) {
	var fname = sourceBundle + "/bundle.json";
	fs.readFile(fname, 'utf8', function (err,data) {
		if (err) {
			console.error("Unable to load file",fname);
			if (callback) callback( err, null );
			return;
		}

		// Update path if missing
		if (!config['path'])
			config['path'] = path.dirname( sourceBundle );

		// Compile
		compile( JSON.parse(data), bundleFile, config, callback );

	});
}
function compileFile ( sourceBundle , bundleFile , config , callback ) { var fname = sourceBundle + "/bundle.json" ; fs . readFile ( fname , 'utf8' , function ( err , data ) { if ( err ) { console . error ( "Unable to load file" , fname ) ; if ( callback ) callback ( err , null ) ; return ; } // Update path if missing if ( ! config [ 'path' ] ) config [ 'path' ] = path . dirname ( sourceBundle ) ; // Compile compile ( JSON . parse ( data ) , bundleFile , config , callback ) ; } ) ; }
Wrapper function for the compile function, that first loads the
bundle specs from the source bundle file specified.
Wrapper function for the compile function that first loads the bundle specs from the source bundle file specified .