tasks/multimocksGenerator.js
function (templatePath, path, data, name) {
    var templateString = fs.readFileSync(templatePath);

    // generate scenarioData.js contents by inserting data into template
    var templateData = {scenarioData: data};
    templateData.scenarioDataName = name || '';

    var output = _.template(templateString)(templateData);

    mkdirp.sync(getDirName(path));
    fs.writeFileSync(path, output);
  }
function (templatePath, path, data, name) {
    var templateString = fs.readFileSync(templatePath);

    // generate scenarioData.js contents by inserting data into template
    var templateData = {scenarioData: data};
    templateData.scenarioDataName = name || '';

    var output = _.template(templateString)(templateData);

    mkdirp.sync(getDirName(path));
    fs.writeFileSync(path, output);
  }
function ( templatePath , path , data , name ) { var templateString = fs . readFileSync ( templatePath ) ; // generate scenarioData.js contents by inserting data into template var templateData = { scenarioData : data } ; templateData . scenarioDataName = name || '' ; var output = _ . template ( templateString ) ( templateData ) ; mkdirp . sync ( getDirName ( path ) ) ; fs . writeFileSync ( path , output ) ; }
Save the file

@param {string} template
@param {string} path
@param {string} data
@param {string} name
Save the file