Comparing version 1.0.23 to 1.0.24
{ | ||
"name": "hrt", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "HTTP Rewrite Tool", | ||
@@ -5,0 +5,0 @@ "author": "Longhao Luo <lhluo@tudou.com>", |
var Fs = require('fs'); | ||
var Fs = require('fs'); | ||
var Path = require('path'); | ||
@@ -35,3 +34,3 @@ var Util = require('../util'); | ||
var root = path.replace(/^(.*?)[\\\/](src|build|dist)[\\\/].*$/, '$1'); | ||
var relativePath = path.split(Path.sep).join('/').replace(/^.+\/src\//, ''); | ||
var relativePath = path.split(Path.sep).join('/').replace(/^.+\/src\/js\//, ''); | ||
var mid = relativePath.replace(/\.js$/, ''); | ||
@@ -139,3 +138,3 @@ | ||
dumpLineNumbers : 'comments', | ||
paths : ['.', root + '/src'], | ||
paths : ['.', root + '/src/css'], | ||
filename : path, | ||
@@ -153,3 +152,3 @@ }); | ||
if (!/src\/(lib|lite|loader)\.js$/.test(newPath) && /src\/.+\.js$/.test(newPath)) { | ||
if (!/src\/js\/(lib|lite|loader)\.js$/.test(newPath) && /src\/js\/.+\.js$/.test(newPath)) { | ||
var str = Util.readFileSync(path, 'utf-8'); | ||
@@ -156,0 +155,0 @@ str = fixModule(path, str); |
16
271841
6048