Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const glob = require('glob');
- const fse = require('fs-extra');
- const a = glob.sync('./system**');
- //fse.ensureDirSync(".")
- a.forEach(b => {
- fse.ensureDirSync(`./${b.slice(0,-3)}`);
- fse.moveSync(b, `./${b.slice(0,-3)}/index.js`)
- });
- console.log(a);
Advertisement
Add Comment
Please, Sign In to add comment