@putout/plugin-cloudcmd 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/lib/convert-io-delete-to-io-remove/index.js +6 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ npm i putout @putout/plugin-cloudcmd -D
|
|
|
16
16
|
- ✅ [apply-init-module](#apply-init-module);
|
|
17
17
|
- ✅ [convert-io-mv-to-io-move](#convert-io-mv-to-io-move);
|
|
18
18
|
- ✅ [convert-io-cp-to-io-copy](#convert-io-cp-to-io-copy);
|
|
19
|
+
- ✅ [convert-io-delete-to-io-remove](#convert-io-delete-to-io-remove);
|
|
19
20
|
- ✅ [convert-load-dir-to-change-dir](#convert-load-dir-to-change-dir);
|
|
20
21
|
- ✅ [convert-arrow-to-declaration](#convert-arrow-to-declaration);
|
|
21
22
|
|
|
@@ -27,6 +28,7 @@ npm i putout @putout/plugin-cloudcmd -D
|
|
|
27
28
|
"cloudcmd/apply-init-module": "on",
|
|
28
29
|
"cloudcmd/convert-io-mv-to-io-move": "on",
|
|
29
30
|
"cloudcmd/convert-io-cp-to-io-copy": "on",
|
|
31
|
+
"cloudcmd/convert-io-delete-to-io-remove": "on",
|
|
30
32
|
"cloudcmd/convert-load-dir-to-change-dir": "on",
|
|
31
33
|
"cloudcmd/convert-arrow-to-declaration": "on"
|
|
32
34
|
},
|
|
@@ -54,6 +56,22 @@ await IO.mv({
|
|
|
54
56
|
await IO.move(dirPath, mp3Dir, mp3Names);
|
|
55
57
|
```
|
|
56
58
|
|
|
59
|
+
# convert-io-delete-to-io-remove
|
|
60
|
+
|
|
61
|
+
## ❌ Example of incorrect code
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
await IO.delete('/tmp', ['1.txt']);
|
|
65
|
+
await IO.delete('/tmp');
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## ✅ Example of correct code
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
await IO.remove('/tmp', ['1.txt']);
|
|
72
|
+
await IO.remove('/tmp');
|
|
73
|
+
```
|
|
74
|
+
|
|
57
75
|
# convert-io-cp-to-io-copy
|
|
58
76
|
|
|
59
77
|
## ❌ Example of incorrect code
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as convertIoDeleteToIoRemove from './convert-io-delete-to-io-remove/index.js';
|
|
1
2
|
import * as applyInitModule from './apply-init-module/index.js';
|
|
2
3
|
import * as convertArrowToDeclaration from './convert-arrow-to-declaration/index.js';
|
|
3
4
|
import * as convertIoMvToIoMove from './convert-io-mv-to-io-move/index.js';
|
|
@@ -12,4 +13,5 @@ export const rules = {
|
|
|
12
13
|
'convert-load-dir-to-change-dir': convertLoadDirToChangeDir,
|
|
13
14
|
'convert-arrow-to-declaration': convertArrowToDeclaration,
|
|
14
15
|
'apply-init-module': applyInitModule,
|
|
16
|
+
'convert-io-delete-to-io-remove': convertIoDeleteToIoRemove,
|
|
15
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-cloudcmd",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin adds ability to transform code to new API of Cloud Commander",
|