node-oojs-tool
Advanced tools
+1
-1
@@ -6,3 +6,3 @@ { | ||
| "main": "", | ||
| "version": "1.0.7", | ||
| "version": "1.0.8", | ||
| "engines": { | ||
@@ -9,0 +9,0 @@ "node": ">=0.4.0" |
@@ -102,3 +102,3 @@ define && define({ | ||
| var importRegexp = /\$import\((\S+)\)\s*;/gi; | ||
| var importWithDepsRegexp = /\$importWithDeps\((\S+)\)\s*;/gi; | ||
| var importWithDepsRegexp = /\$importAll\((\S+)\)\s*;/gi; | ||
| var importMatch; | ||
@@ -111,5 +111,12 @@ | ||
| importFilePath = importFilePath.replace(/\'/gi, "").replace(/\"/gi, ""); | ||
| if (importFilePath) { | ||
| result = this.fileSync.readFileSync(importFilePath); | ||
| //处理 module 引用 | ||
| if(importFilePath && importFilePath.indexOf('oojs')>-1){ | ||
| importFilePath = "./node_modules/node-oojs/src/" + importFilePath.replace('oojs.', "") + ".js"; | ||
| } | ||
| else{ | ||
| importFilePath = oojs.getClassPath(importFilePath); | ||
| } | ||
| result = this.fileSync.readFileSync(importFilePath); | ||
| return result; | ||
@@ -116,0 +123,0 @@ }.proxy(this)); |
19563
1.89%437
1.16%