ratchapong

Untitled

May 13th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. const glob = require('glob');
  2. const fse = require('fs-extra');
  3. const a = glob.sync('./system**');
  4. //fse.ensureDirSync(".")
  5. a.forEach(b => {
  6. fse.ensureDirSync(`./${b.slice(0,-3)}`);
  7. fse.moveSync(b, `./${b.slice(0,-3)}/index.js`)
  8. });
  9. console.log(a);
Advertisement
Add Comment
Please, Sign In to add comment