code: function save(template, distpath) {
    var data = generate(template);
    var dir = path.dirname(distpath);
  
    mkdirp(dir, function(err) {
      if(err) {
        console.log(err.message);
        return;
      }
  
      fs.writeFile(distpath, JSON.stringify(data, null, 2), function(err) {
        if(err) {
          console.log(err.message);
          return;
        }
      });
  
    });
  
  }
docs: save as json file
  @param template - json scheme
  @param path - path to save file