scripts/generator.js
function generateCodeEntryJs (config) {

	// Read the entry point script
	var entry_js = null;
	try {
		// Read from current script
		entry_js = fs.readFileSync(ENTRY_POINT_FILENAME).toString();
	} catch (e) {
		// Read from template script
		entry_js = fs.readFileSync(__dirname + '/../templates/' + ENTRY_POINT_FILENAME + '.tmpl').toString() + '\n';
	}

	return entry_js;

}
function generateCodeEntryJs (config) {

	// Read the entry point script
	var entry_js = null;
	try {
		// Read from current script
		entry_js = fs.readFileSync(ENTRY_POINT_FILENAME).toString();
	} catch (e) {
		// Read from template script
		entry_js = fs.readFileSync(__dirname + '/../templates/' + ENTRY_POINT_FILENAME + '.tmpl').toString() + '\n';
	}

	return entry_js;

}
function generateCodeEntryJs ( config ) { // Read the entry point script var entry_js = null ; try { // Read from current script entry_js = fs . readFileSync ( ENTRY_POINT_FILENAME ) . toString ( ) ; } catch ( e ) { // Read from template script entry_js = fs . readFileSync ( __dirname + '/../templates/' + ENTRY_POINT_FILENAME + '.tmpl' ) . toString ( ) + '\n' ; } return entry_js ; }
Generate the source code for entory point
@param  {Object} config Device configuration
@return {String}        Source code
Generate the source code for entory point