binhend 2.1.34 → 2.1.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "binhend",
3
- "version": "2.1.34",
3
+ "version": "2.1.35",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "Nguyen Duc Binh",
@@ -20,19 +20,24 @@ function processEachFile({ source: sourceRootPath, web: outputRootPath, module:
20
20
  scanNestedFiles(stageRootPath, (file, done) => {
21
21
  if (done) return callbackDone instanceof Function ? callbackDone({ outputRootPath }) : null;
22
22
 
23
- var fileSourcePath = file.path.replace(stageRootPath, sourceRootPath);
24
- var fileOutputPath = file.path.replace(stageRootPath, outputRootPath);
23
+ var fileStagePath = file.path;
24
+ var fileSourcePath = fileStagePath.replace(stageRootPath, sourceRootPath);
25
+ var fileOutputPath = fileStagePath.replace(stageRootPath, outputRootPath);
25
26
 
26
27
  makeFullDirPath(fileOutputPath);
27
28
 
28
29
  var filename = parseFileName(file.name);
29
30
 
30
- if (!isAcceptedJS(filename) || isExceptedJS(filename)) {
31
+ if (!isAcceptedJS(filename)) {
31
32
  return cloneFileIfNew(fileSourcePath, fileOutputPath);
32
33
  }
33
34
 
35
+ if (isExceptedJS(filename)) {
36
+ return cloneFileIfNew(fileStagePath, fileOutputPath);
37
+ }
38
+
34
39
  try {
35
- var component = require(file.path);
40
+ var component = require(fileStagePath);
36
41
  }
37
42
  catch (error) {
38
43
  console.error('[BINHEND][WEB-BUILD]', error);