4.0.0 β’ Published 8 months ago
@putout/plugin-cloudcmd v4.0.0
@putout/plugin-cloudcmd 
πPutout plugin adds ability to transform to new Cloud Commander API.
Install
npm i putout @putout/plugin-cloudcmd -DAdd .putout.json with:
{
"plugins": {
"cloudcmd": "on"
}
}Rules
{
"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"
}
}convert-io-mv-to-io-move
β Example of incorrect code
await IO.mv({
from: dirPath,
to: mp3Dir,
names: mp3Names,
});β Example of correct code
await IO.move(dirPath, mp3Dir, mp3Names);convert-io-cp-to-io-copy
β Example of incorrect code
await IO.cp({
from: dirPath,
to: mp3Dir,
names: mp3Names,
});β Example of correct code
await IO.copy(dirPath, mp3Dir, mp3Names);convert-io-write-to-io-create-directory
β Example of incorrect code
await IO.write(`${mp3Dir}?dir`);β Example of correct code
await IO.createDirectory(mp3Dir);convert-load-dir-to-change-dir
Check out in πPutout Editor.
β Example of incorrect code
await CloudCmd.loadDir({
path: '/',
panel,
});β Example of correct code
await CloudCmd.changeDir('/', {
panel,
});License
MIT