Permalink
Browse files

chore: remove grunt move to npm scripts (#5592)

  • Loading branch information...
BrandonOCasey authored and gkatsev committed Nov 30, 2018
1 parent 0090b75 commit d72786fc0ca66bea63680f5c84e0d8573d998057

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,28 @@
const fs = require('fs');
const path = require('path');
const klawSync = require('klaw-sync');

const files = klawSync('sandbox/').filter((file) => path.extname(file.path) === '.example');

const changes = files.map(function(file) {
const p = path.parse(file.path);
const nonExample = path.join(p.dir, p.name);
return {
file: file.path,
copy: nonExample
};
})
.filter(function(change) {
return !fs.existsSync(change.copy);
});

changes.forEach(function(change) {
fs.copyFileSync(change.file, change.copy);
});

if (changes.length) {
console.log("Updated Sandbox files for:");
console.log('\t' + changes.map((chg) => chg.copy).join('\n\t'));
} else {
console.log("No sandbox updates necessary");
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit d72786f

Please sign in to comment.