Comparing version 1.0.7 to 1.0.8
@@ -15,7 +15,7 @@ | ||
//['http://jstest.tudouui.com/js/lib/tuilib2.js', exports.serverRoot + '/js/lib/tuilib2_src.js'], | ||
// ['http://jstest.tudouui.com/js/fn/flashloader2.js', exports.serverRoot + '/js/fn/flashloader2_src.js'], | ||
// ['http://jstest.tudouui.com/js/page/play/v4/main.js', exports.serverRoot + '/js/page/play/v4/main_src.js'], | ||
// ['http://jstest.tudouui.com/js/page/play/v4/comment.js', exports.serverRoot + '/js/page/play/v4/comment_src.js'], | ||
// ['http://csstest.tudouui.com/skin/play/v4/play.css', exports.serverRoot + '/skin/play/v4/play_src.css'], | ||
// ['http://csstest.tudouui.com/skin/play/v4/img/pcapp.png', exports.serverRoot + '/skin/play/v4/img/pcapp.png'], | ||
//['http://jstest.tudouui.com/js/fn/flashloader2.js', exports.serverRoot + '/js/fn/flashloader2_src.js'], | ||
//['http://jstest.tudouui.com/js/page/play/v4/main.js', exports.serverRoot + '/js/page/play/v4/main_src.js'], | ||
//['http://jstest.tudouui.com/js/page/play/v4/comment.js', exports.serverRoot + '/js/page/play/v4/comment_src.js'], | ||
//['http://csstest.tudouui.com/skin/play/v4/play.css', exports.serverRoot + '/skin/play/v4/play_src.css'], | ||
//['http://csstest.tudouui.com/skin/play/v4/img/pcapp.png', exports.serverRoot + '/skin/play/v4/img/pcapp.png'], | ||
['http://jstest.tudouui.com/bin/lingtong/PortalPlayer.swf', 'http://10.5.28.37/ad/tudouPlayer.swf'], | ||
@@ -22,0 +22,0 @@ //['http://jstest.tudouui.com/js/lib/tuilib2.js', 'http://js.tudouui.com/js/lib/tuilib2.js'], |
16
main.js
@@ -8,2 +8,3 @@ | ||
var Request = require('request'); | ||
var Watchr = require('watchr'); | ||
@@ -52,6 +53,13 @@ var HttpProxy = require('./http-proxy'); | ||
// reload config | ||
Fs.watch(CONFIG_FILE, function(event, filename) { | ||
if(event == 'change') { | ||
delete require.cache[CONFIG_FILE]; | ||
CONFIG = require(CONFIG_FILE); | ||
Watchr.watch({ | ||
paths: [CONFIG_FILE], | ||
listeners: { | ||
error: function(err) { | ||
Util.error('[watch] ', err); | ||
}, | ||
change: function() { | ||
delete require.cache[CONFIG_FILE]; | ||
CONFIG = require(CONFIG_FILE); | ||
Util.info('[watch] reload config: ' + CONFIG_FILE); | ||
} | ||
} | ||
@@ -58,0 +66,0 @@ }); |
{ | ||
"name": "hrt", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "HTTP Rewrite Tool for Frontend", | ||
@@ -25,2 +25,3 @@ "author": "Longhao Luo <lhluo@tudou.com>", | ||
"request": "~2.12.0", | ||
"watchr": "~2.4.3", | ||
"less": "~1.4.0-b2" | ||
@@ -27,0 +28,0 @@ }, |
1157501
23955
6
+ Addedwatchr@~2.4.3
+ Addedambi@2.5.0(transitive)
+ Addedcsextends@1.2.0(transitive)
+ Addedeachr@2.0.4(transitive)
+ Addededitions@1.3.42.3.1(transitive)
+ Addederrlop@2.2.0(transitive)
+ Addedextendr@2.1.0(transitive)
+ Addedextract-opts@2.2.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedignorefs@1.4.1(transitive)
+ Addedignorepatterns@1.4.0(transitive)
+ Addedsafefs@3.2.2(transitive)
+ Addedscandirectory@2.5.0(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedtaskgroup@4.3.1(transitive)
+ Addedtypechecker@2.0.82.1.04.11.0(transitive)
+ Addedwatchr@2.4.13(transitive)