File tree Expand file tree Collapse file tree 8 files changed +68
-7
lines changed Expand file tree Collapse file tree 8 files changed +68
-7
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ language : node_js
2
+ node_js :
3
+ - " 0.8"
4
+ before_script :
5
+ - npm install -g grunt-cli
Original file line number Diff line number Diff line change
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
+ } ;
Original file line number Diff line number Diff line change
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
+
1
4
# node-devserver
2
5
3
6
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:
64
67
* parse ` regexp ` using [ XRegExp] ( http://xregexp.com )
65
68
* match request agains ` regexp ` and store capture
66
69
* replace placeholders with captured elements
67
- * proxy request using the ` proxy ` argument
70
+ * proxy request using the ` proxy ` argument
Original file line number Diff line number Diff line change 1
1
exports = module . exports = function backend ( ) {
2
+ "use strict" ;
3
+
2
4
var OBJECT_PROTOTYPE_TOSTRING = Object . prototype . toString ;
3
5
var TOSTRING_OBJECT = OBJECT_PROTOTYPE_TOSTRING . call ( Object . prototype ) ;
4
6
var TOSTRING_ARRAY = OBJECT_PROTOTYPE_TOSTRING . call ( Array . prototype ) ;
@@ -95,5 +97,5 @@ exports = module.exports = function backend() {
95
97
} ) ) {
96
98
next ( ) ;
97
99
}
98
- }
100
+ } ;
99
101
} ;
Original file line number Diff line number Diff line change 1
1
exports = module . exports = function frontend ( ) {
2
+ "use strict" ;
2
3
3
4
var send = require ( "send" ) ;
4
5
var pause = require ( "pause" ) ;
@@ -51,5 +52,5 @@ exports = module.exports = function frontend() {
51
52
}
52
53
53
54
serve ( ) ;
54
- }
55
+ } ;
55
56
} ;
Original file line number Diff line number Diff line change 1
- var connect = require ( "connect" ) ;
2
-
3
1
var RE_MODULE = / ^ ( (?: .* [ \/ \\ ] ) ? [ ^ \. ] + ) (?: \. ( .* ) ) ? / ;
4
2
var RE_SEPARATOR = / \. / ;
5
3
@@ -19,6 +17,9 @@ function getModule(name) {
19
17
}
20
18
21
19
exports = module . exports = function devserver ( ) {
20
+ "use strict" ;
21
+
22
+ var connect = require ( "connect" ) ;
22
23
var server = connect ( ) ;
23
24
24
25
Array . prototype . slice . apply ( arguments ) . forEach ( function ( middleware ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" :" devserver" ,
3
- "version" :" 0.2.1 " ,
3
+ "version" :" 0.2.2 " ,
4
4
"description" :" Simple local development server" ,
5
5
6
6
"author" :{
27
27
"xregexp" :" >= 2.0.0"
28
28
},
29
29
30
+ "devDependencies" : {
31
+ "grunt-contrib-jshint" : " ~0.6.0" ,
32
+ "grunt" : " ~0.4.1"
33
+ },
34
+
30
35
"directories" :{
31
36
"lib" :" ./lib" ,
32
37
"bin" :" ./bin" ,
33
38
"example" :" ./example"
34
39
},
35
40
36
- "main" :" ./lib/node-devserver"
41
+ "main" :" ./lib/node-devserver" ,
42
+
43
+ "scripts" : {
44
+ "test" : " grunt test"
45
+ }
37
46
}
You can’t perform that action at this time.
0 commit comments