glyphix 1.0.38 → 1.0.40
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/bin/glyphix.js +8 -7
- package/package.json +1 -1
package/bin/glyphix.js
CHANGED
|
@@ -199,7 +199,7 @@ var GxGenerate = class {
|
|
|
199
199
|
target: "node14",
|
|
200
200
|
// 目标平台设置为最新 ECMAScript
|
|
201
201
|
define: {
|
|
202
|
-
|
|
202
|
+
// 'process.env.GLYPHIX_APP_VERSION': `"${this.getGitVersion()}"`,
|
|
203
203
|
...this.loadEnv()
|
|
204
204
|
},
|
|
205
205
|
nodePaths: [(0, import_node_path3.resolve)(this.sourceRoot, "..", "node_modules")],
|
|
@@ -215,10 +215,11 @@ var GxGenerate = class {
|
|
|
215
215
|
path: args.path
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
const _resolveExtensions = [...resolveExtensions, ""];
|
|
219
|
+
for (let i = 0; i < _resolveExtensions.length; i++) {
|
|
219
220
|
const fullPath = (0, import_node_path3.join)(
|
|
220
221
|
that.buildRoot,
|
|
221
|
-
`${args.path}${
|
|
222
|
+
`${args.path}${_resolveExtensions[i]}`
|
|
222
223
|
);
|
|
223
224
|
if ((0, import_node_fs.existsSync)(fullPath)) {
|
|
224
225
|
return {
|
|
@@ -227,7 +228,7 @@ var GxGenerate = class {
|
|
|
227
228
|
}
|
|
228
229
|
const fullIndexPath = (0, import_node_path3.join)(
|
|
229
230
|
that.buildRoot,
|
|
230
|
-
`${args.path}/index${
|
|
231
|
+
`${args.path}/index${_resolveExtensions[i]}`
|
|
231
232
|
);
|
|
232
233
|
if ((0, import_node_fs.existsSync)(fullIndexPath)) {
|
|
233
234
|
return {
|
|
@@ -295,9 +296,9 @@ var GxGenerate = class {
|
|
|
295
296
|
});
|
|
296
297
|
});
|
|
297
298
|
}
|
|
298
|
-
getGitVersion() {
|
|
299
|
-
|
|
300
|
-
}
|
|
299
|
+
// getGitVersion() {
|
|
300
|
+
// return execSync('git rev-parse HEAD').toString().trim();
|
|
301
|
+
// }
|
|
301
302
|
build() {
|
|
302
303
|
const curDir = process.cwd();
|
|
303
304
|
this.installDependencies().then(() => {
|