code: function writeFile(file, contents) {
  	return new Promise(
  		(resolve, reject) => {
  			fs.writeFile(
  				file, contents, error => {
  					if (error) {
  						reject(error);
  					} else {
  						// console.log('writeFile', [file, contents]);
  						resolve(contents);
  					}
  				}
  			)
  		}
  	);
  }
docs: promises contents written to a file