Have ideas to improve npm?Join in the discussion! »

    @putout/plugin-cloudcmd

    1.2.0 • Public • Published

    @putout/plugin-cloudcmd NPM version Dependency Status

    putout plugin adds ability to transform to new Cloud Commander API.

    Install

    npm i putout @putout/plugin-cloudcmd -D
    

    Add .putout.json with:

    {
        "plugins": {
            "cloudcmd": "on"
        }
    }

    Rules

    {
        "rules": {
            "cloudcmd/convert-io-mv-to-io-move": "on",
            "cloudcmd/convert-io-cp-to-io-copy": "on"
        }
    }

    convert-io-mv-to-io-move

    ❌ Incorrect code example

    await IO.mv({
        from: dirPath,
        to: mp3Dir,
        names: mp3Names,
    });

    ✅ Correct code Example

    await IO.move(dirPath, mp3Dir, mp3Names);

    convert-io-cp-to-io-copy

    ❌ Incorrect code example

    await IO.cp({
        from: dirPath,
        to: mp3Dir,
        names: mp3Names,
    });

    ✅ Correct code Example

    await IO.copy(dirPath, mp3Dir, mp3Names);

    convert-io-write-to-io-create-directory

    ❌ Incorrect code example

    await IO.write(`${mp3Dir}?dir`);
     

    ✅ Correct code Example

    await IO.createDirectory(mp3Dir);

    License

    MIT

    Install

    npm i @putout/plugin-cloudcmd

    DownloadsWeekly Downloads

    232

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    5.66 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar