tooltwist
Version:
Tooltwist Command Line Interface
34 lines (28 loc) • 961 B
JavaScript
var Log = require('./log'),
Config = require('./config'),
Templates = require('./templates');
/**
* Create a default config file for the Designer.
*/
exports.createDefaultConfigFile = function() {
Log.debug('initDesigner.createConfigFile()');
// Use the template to create the file
var from = __dirname + "/../templates/config/designer-tooltwist.js"
Log.debug('from=' + from)
var data = {
MODE: 'designer',
HOST: '-'
};
var creatingExampleTemplate = false;
Templates.copy(from, Config.CONFIG_FILE, creatingExampleTemplate, data);
// Display a nice message.
Log.always();
Log.always('\tSpecification file \'' + Config.CONFIG_FILE + '\' has been created with a default');
Log.always('\tconfiguration that will run the Designer on the demo web design')
Log.always('\tproject \'ttdemo\'. Modify this file to suit your needs, then run:');
Log.always();
Log.always('\t$ tooltwist designer')
Log.always();
// All done
process.exit(0)
}