🐊Putout plugin adds ability to transform to new Cloud Commander API.
npm i putout @putout/plugin-cloudcmd -D
Add .putout.json
with:
{
"plugins": {
"cloudcmd": "on"
}
}
{
"rules": {
"cloudcmd/convert-io-mv-to-io-move": "on",
"cloudcmd/convert-io-cp-to-io-copy": "on",
"cloudcmd/convert-load-dir-to-change-dir": "on"
}
}
await IO.mv({
from: dirPath,
to: mp3Dir,
names: mp3Names,
});
await IO.move(dirPath, mp3Dir, mp3Names);
await IO.cp({
from: dirPath,
to: mp3Dir,
names: mp3Names,
});
await IO.copy(dirPath, mp3Dir, mp3Names);
await IO.write(`${mp3Dir}?dir`);
await IO.createDirectory(mp3Dir);
Check out in 🐊Putout Editor.
await CloudCmd.loadDir({
path: '/',
panel,
});
await CloudCmd.changeDir('/', {
panel,
});
MIT