@kezh/my-custom-js-converter 0.0.27 → 0.0.29

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.
Files changed (2) hide show
  1. package/core/encode.js +5 -1
  2. package/package.json +1 -1
package/core/encode.js CHANGED
@@ -63,10 +63,14 @@ function encoding$0(inPath, outPath) {
63
63
  });
64
64
  const srcAst = (0, parser_1.parse)(src);
65
65
  const methods = [];
66
+ const customMethodNames = getSrcMethodNames(ENTRY, srcAst);
67
+ if (!customMethodNames.length) {
68
+ console.log(`not found entry => ${ENTRY}`);
69
+ return;
70
+ }
66
71
  const importModPathByName = getImportModPaths(path_1.default.dirname(inPath), srcAst);
67
72
  const importMethodNamesByMod = getImportMethodNames([...importModPathByName.keys()], srcAst);
68
73
  const importMethods = getImportMethods(importModPathByName, importMethodNamesByMod);
69
- const customMethodNames = getSrcMethodNames(ENTRY, srcAst);
70
74
  modifyCallObjectAndMethodNames(customMethodNames, [...importModPathByName.keys()], srcAst);
71
75
  const customMethods = getMethods(ENTRY, srcAst);
72
76
  methods.push(...customMethods, ...importMethods);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kezh/my-custom-js-converter",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "自定义代码转换器",
5
5
  "main": "index.js",
6
6
  "bin": {