Last active
January 13, 2020 07:19
-
-
Save pissang/1fcc7b1122b4cbd03d6862b5d4fdfdff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const glob = require('glob'); | |
const child_process = require('child_process'); | |
const util = require('util'); | |
const exec = util.promisify(child_process.exec); | |
glob('src/**/*.js', async (err, files) => { | |
console.log(files); | |
for (let file of files) { | |
await exec(`git mv ${file} ${file.replace('.js', '.ts')}`); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment