File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+
14# node-devserver
25
36A 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
Original file line number Diff line number Diff line change 11exports = 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} ;
Original file line number Diff line number Diff line change 11exports = 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} ;
Original file line number Diff line number Diff line change 1- var connect = require ( "connect" ) ;
2-
31var RE_MODULE = / ^ ( (?: .* [ \/ \\ ] ) ? [ ^ \. ] + ) (?: \. ( .* ) ) ? / ;
42var RE_SEPARATOR = / \. / ;
53
@@ -19,6 +17,9 @@ function getModule(name) {
1917}
2018
2119exports = 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 ) {
Original file line number Diff line number Diff line change 11{
22 "name" :" devserver" ,
3- "version" :" 0.2.1 " ,
3+ "version" :" 0.2.2 " ,
44 "description" :" Simple local development server" ,
55
66 "author" :{
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}
You can’t perform that action at this time.
0 commit comments