Skip to content

Commit 7619dfd

Browse files
committed
Merge branch 'release/0.2.2'
2 parents 9ef09e9 + 672eae1 commit 7619dfd

File tree

8 files changed

+68
-7
lines changed

8 files changed

+68
-7
lines changed

.jshintrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"curly": true,
3+
"eqeqeq": true,
4+
"immed": true,
5+
"latedef": true,
6+
"newcap": false,
7+
"noarg": true,
8+
"sub": true,
9+
"undef": true,
10+
"boss": true,
11+
"eqnull": true,
12+
"node": true,
13+
"laxbreak": true
14+
}

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- "0.8"
4+
before_script:
5+
- npm install -g grunt-cli

Gruntfile.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* node-devserver
3+
* https://github.com/mikaelkaron/node-devserver
4+
*
5+
* Copyright (c) 2013 Mikael Karon
6+
* Licensed under the MIT license.
7+
*/
8+
module.exports = function(grunt) {
9+
"use strict";
10+
11+
grunt.initConfig({
12+
"jshint": {
13+
"all": [
14+
"Gruntfile.js",
15+
"lib/**/*.js"
16+
],
17+
"options": {
18+
"jshintrc": ".jshintrc"
19+
}
20+
}
21+
});
22+
23+
grunt.loadNpmTasks("grunt-contrib-jshint");
24+
grunt.registerTask("test", [ "jshint" ]);
25+
grunt.registerTask("default", [ "test" ]);
26+
};

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[![Build Status](https://travis-ci.org/mikaelkaron/node-devserver.png)](https://travis-ci.org/mikaelkaron/node-devserver)
2+
[![NPM version](https://badge.fury.io/js/devserver.png)](http://badge.fury.io/js/devserver)
3+
14
# node-devserver
25

36
A simple development server geared towards front-end developers and ADD (Api Driven Development) applications.
@@ -64,4 +67,4 @@ Options are tried in order like this:
6467
* parse `regexp` using [XRegExp](http://xregexp.com)
6568
* match request agains `regexp` and store capture
6669
* replace placeholders with captured elements
67-
* proxy request using the `proxy` argument
70+
* proxy request using the `proxy` argument

lib/middleware/backend.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
exports = module.exports = function backend() {
2+
"use strict";
3+
24
var OBJECT_PROTOTYPE_TOSTRING = Object.prototype.toString;
35
var TOSTRING_OBJECT = OBJECT_PROTOTYPE_TOSTRING.call(Object.prototype);
46
var TOSTRING_ARRAY = OBJECT_PROTOTYPE_TOSTRING.call(Array.prototype);
@@ -95,5 +97,5 @@ exports = module.exports = function backend() {
9597
})) {
9698
next();
9799
}
98-
}
100+
};
99101
};

lib/middleware/frontend.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
exports = module.exports = function frontend() {
2+
"use strict";
23

34
var send = require("send");
45
var pause = require("pause");
@@ -51,5 +52,5 @@ exports = module.exports = function frontend() {
5152
}
5253

5354
serve();
54-
}
55+
};
5556
};

lib/node-devserver.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
var connect = require("connect");
2-
31
var RE_MODULE = /^((?:.*[\/\\])?[^\.]+)(?:\.(.*))?/;
42
var RE_SEPARATOR = /\./;
53

@@ -19,6 +17,9 @@ function getModule(name) {
1917
}
2018

2119
exports = module.exports = function devserver() {
20+
"use strict";
21+
22+
var connect = require("connect");
2223
var server = connect();
2324

2425
Array.prototype.slice.apply(arguments).forEach(function (middleware) {

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"devserver",
3-
"version":"0.2.1",
3+
"version":"0.2.2",
44
"description":"Simple local development server",
55

66
"author":{
@@ -27,11 +27,20 @@
2727
"xregexp":">= 2.0.0"
2828
},
2929

30+
"devDependencies": {
31+
"grunt-contrib-jshint": "~0.6.0",
32+
"grunt": "~0.4.1"
33+
},
34+
3035
"directories":{
3136
"lib":"./lib",
3237
"bin":"./bin",
3338
"example":"./example"
3439
},
3540

36-
"main":"./lib/node-devserver"
41+
"main":"./lib/node-devserver",
42+
43+
"scripts": {
44+
"test": "grunt test"
45+
}
3746
}

0 commit comments

Comments
 (0)