Skip to content

Instantly share code, notes, and snippets.

@clovisdasilvaneto
Last active March 22, 2017 20:43
Show Gist options
  • Save clovisdasilvaneto/41c3e11210e67471a2971e35fd38025d to your computer and use it in GitHub Desktop.
Save clovisdasilvaneto/41c3e11210e67471a2971e35fd38025d to your computer and use it in GitHub Desktop.
function copyData(srcFile, cssImport) {
let cssImports;
fs.readFile(srcFile, 'utf8', function (err, data) {
if (err) throw err;
cssImports = `
${data}; \n
@import ${csssImport};
`;
//Do your processing, MD5, send a satellite to the moon, etc.
fs.writeFile (srcFile, cssImports, function(err) {
if (err) throw err;
console.log('complete');
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment