@kezh/my-custom-js-converter 0.0.6 → 0.0.8

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/core/decode.js CHANGED
@@ -45,7 +45,10 @@ function decoding$0(inPath, outPath, mount = MOUNT) {
45
45
  deleteModMethods(customConfig.mod, srcAst);
46
46
  let { code: dist } = (0, generator_1.default)(srcAst);
47
47
  dist = dist.replace(/},\n\n/g, '},\n');
48
- dist = prettier_1.default.format(dist);
48
+ dist = prettier_1.default.format(dist, {
49
+ parser: 'babel',
50
+ trailingComma: 'none'
51
+ });
49
52
  fs_1.default.writeFileSync(outPath, dist, "utf-8");
50
53
  }
51
54
  function importMods(outDir, mods, srcAst) {
package/core/encode.js CHANGED
@@ -104,6 +104,7 @@ function getImportMethods(modPathByName, methodNamesByMod) {
104
104
  let mergeMethodNames = [
105
105
  ...new Set([...useMethodNames, ...inlineMethodNames])
106
106
  ];
107
+ console.log(`import methods => ${mergeMethodNames}`);
107
108
  modifyModMethods(name, mergeMethodNames, modAst);
108
109
  mergeMethodNames = mergeMethodNames.map((m) => `${m}__${name}`);
109
110
  const mergeMethods = modMethods
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kezh/my-custom-js-converter",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "自定义代码转换器",
5
5
  "main": "index.js",
6
6
  "bin": {