css-doodle/tools/tab2spaces

17 lines
315 B
JavaScript
Executable File

#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const target = path.join(__dirname, '../css-doodle.js');
try {
const content = fs.readFileSync(target, 'utf8')
.replace(/\t/g, ' ')
if (content) {
fs.writeFileSync(target, content, 'utf8');
}
} catch (e) {
// it's ok
}