Update dependencies

Replace pre-commit hook with Husky and lint-staged
This commit is contained in:
2019-03-03 23:26:24 +00:00
parent a81cb7cce8
commit 2598314c2b
4 changed files with 3001 additions and 5637 deletions

View File

@@ -15,18 +15,20 @@ imagemin(['images/*.{png,jpg,gif}'], 'theme/images', {
}),
imageminJpegtran(),
],
}).then((files) => {
files.forEach((file) => {
const path = resolve(__dirname, '../', file.path);
writeFile(path, file.data, (error) => {
if (error) {
console.error(error);
process.exit(1);
}
console.log(`File written: ${path}`);
})
.then((files) => {
files.forEach((file) => {
const path = resolve(__dirname, '../', file.path);
writeFile(path, file.data, (error) => {
if (error) {
process.stdout.write(`${error}\n`);
process.exit(1);
}
process.stdout.write(`File written: ${path}\n`);
});
});
})
.catch((error) => {
process.stdout.write(`${error}\n`);
process.exit(1);
});
}).catch((error) => {
console.error(error);
process.exit(1);
});