File tree 5 files changed +336
-341
lines changed
5 files changed +336
-341
lines changed Original file line number Diff line number Diff line change
1
+ tiny-lr.pid
2
+ .tern-port
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- const fs = require ( 'fs' ) ;
2
1
const path = require ( 'path' ) ;
3
2
const express = require ( 'express' ) ;
4
3
const tinylr = require ( '../..' ) ;
@@ -18,18 +17,6 @@ function logger (fmt) {
18
17
} ;
19
18
}
20
19
21
- function throttle ( delay , fn ) {
22
- var now = Date . now ( ) ;
23
-
24
- return function ( ) {
25
- var from = Date . now ( ) ;
26
- var interval = from - now ;
27
- if ( interval < delay ) return ;
28
- now = from ;
29
- fn . apply ( this , arguments ) ;
30
- } ;
31
- }
32
-
33
20
( function watch ( em ) {
34
21
em = em || new ( require ( 'events' ) . EventEmitter ) ( ) ;
35
22
Original file line number Diff line number Diff line change 5
5
"main" : " ./src" ,
6
6
"scripts" : {
7
7
"prepublish:" : " npm test" ,
8
- "start" : " make" ,
9
- "test" : " make test" ,
8
+ "test" : " npm run eslint && npm run mocha" ,
9
+ "eslint" : " eslint . --debug" ,
10
+ "babel" : " babel lib/ -d src && babel test/ -d src_test/" ,
11
+ "mocha" : " npm run babel && mocha --reporter spec src_test/" ,
10
12
"test-debug" : " DEBUG=tinylr:* mocha --reporter list" ,
11
13
"test-debug-all" : " DEBUG=* mocha --reporter list" ,
12
14
"post-change" : " sh scripts/post-change" ,
13
- "get-change" : " curl http://localhost:35729/changed?files=site.css"
15
+ "get-change" : " curl http://localhost:35729/changed?files=site.css" ,
16
+ "watch" : " npm-watch"
17
+ },
18
+ "watch" : {
19
+ "babel" : " {lib,test}/**/*.js"
14
20
},
15
21
"files" : [
16
22
" lib"
20
26
"debug" : " ~2.2.0" ,
21
27
"faye-websocket" : " ~0.10.0" ,
22
28
"livereload-js" : " ^2.2.0" ,
29
+ "npm-watch" : " ^0.1.6" ,
23
30
"qs" : " ^6.2.0"
24
31
},
25
32
"devDependencies" : {
33
40
"eslint-plugin-standard" : " ^1.3.2" ,
34
41
"express" : " ^4.1.1" ,
35
42
"gaze" : " ^1.1.2" ,
36
- "make" : " ^0.8.1" ,
37
43
"mocha" : " ^2.3.3" ,
38
44
"standard-version" : " ^2.2.1" ,
39
- "supertest" : " ^1.2.0" ,
40
- "watchd" : " github:mklabs/watchd"
45
+ "supertest" : " ^1.2.0"
41
46
},
42
47
"author" : " mklabs" ,
43
48
"homepage" : " https://github.com/mklabs/tiny-lr" ,
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments