Skip to content

Commit f5c4a29

Browse files
committedOct 15, 2016
Cleanup dependencies, remove Makefile and rework as npm run scripts
1 parent ddf0db9 commit f5c4a29

File tree

5 files changed

+336
-341
lines changed

5 files changed

+336
-341
lines changed
 

‎.npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tiny-lr.pid
2+
.tern-port

‎Makefile

-25
This file was deleted.

‎examples/express/app.js

-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const fs = require('fs');
21
const path = require('path');
32
const express = require('express');
43
const tinylr = require('../..');
@@ -18,18 +17,6 @@ function logger (fmt) {
1817
};
1918
}
2019

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-
3320
(function watch (em) {
3421
em = em || new (require('events').EventEmitter)();
3522

‎package.json

+11-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
"main": "./src",
66
"scripts": {
77
"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/",
1012
"test-debug": "DEBUG=tinylr:* mocha --reporter list",
1113
"test-debug-all": "DEBUG=* mocha --reporter list",
1214
"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"
1420
},
1521
"files": [
1622
"lib"
@@ -20,6 +26,7 @@
2026
"debug": "~2.2.0",
2127
"faye-websocket": "~0.10.0",
2228
"livereload-js": "^2.2.0",
29+
"npm-watch": "^0.1.6",
2330
"qs": "^6.2.0"
2431
},
2532
"devDependencies": {
@@ -33,11 +40,9 @@
3340
"eslint-plugin-standard": "^1.3.2",
3441
"express": "^4.1.1",
3542
"gaze": "^1.1.2",
36-
"make": "^0.8.1",
3743
"mocha": "^2.3.3",
3844
"standard-version": "^2.2.1",
39-
"supertest": "^1.2.0",
40-
"watchd": "github:mklabs/watchd"
45+
"supertest": "^1.2.0"
4146
},
4247
"author": "mklabs",
4348
"homepage": "https://github.com/mklabs/tiny-lr",

‎yarn.lock

+323-297
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.