@putout/processor-filesystem 1.0.1 → 1.0.2
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/lib/filesystem.js +5 -2
- package/package.json +1 -1
package/lib/filesystem.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import filesystemCLI from '@putout/cli-filesystem';
|
|
2
2
|
import filesystem from '@putout/operator-filesystem';
|
|
3
3
|
|
|
4
|
-
filesystem.init(filesystemCLI);
|
|
5
|
-
|
|
6
4
|
const prefix = `__putout_processor_filesystem(`;
|
|
7
5
|
const sufix = ');\n';
|
|
8
6
|
|
|
@@ -11,6 +9,8 @@ export const files = [
|
|
|
11
9
|
];
|
|
12
10
|
|
|
13
11
|
export const branch = (rawSource) => {
|
|
12
|
+
filesystem.init(filesystemCLI);
|
|
13
|
+
|
|
14
14
|
const source = toJS(rawSource);
|
|
15
15
|
|
|
16
16
|
return [{
|
|
@@ -20,7 +20,10 @@ export const branch = (rawSource) => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const merge = (rawSource, list) => {
|
|
23
|
+
filesystem.deinit(filesystemCLI);
|
|
24
|
+
|
|
23
25
|
const [source] = list;
|
|
26
|
+
|
|
24
27
|
return fromJS(source) + '\n';
|
|
25
28
|
};
|
|
26
29
|
|
package/package.json
CHANGED