File tree Expand file tree Collapse file tree 4 files changed +30
-13
lines changed
Expand file tree Collapse file tree 4 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ module.exports = function(grunt) {
1515 express : {
1616 files : [
1717 'server.js' ,
18- 'server/**/*.{js,json}' ,
19- 'visualtesting.conf.js'
18+ 'server/**/*.{js,json}'
2019 ] ,
2120 tasks : [ 'express:dev' ] ,
2221 options : {
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ 'use strict' ;
3+
4+ var Bluebird = require ( 'bluebird' ) ;
5+ var path = require ( 'path' ) ;
6+ var findup = Bluebird . promisify ( require ( 'findup' ) ) ;
7+ var App = require ( '../server/app' ) ;
8+ var Configuration = require ( '../server/configuration' ) ;
9+
10+ var configFile = 'visualtesting.conf.js' ;
11+ var configFilePath ;
12+
13+ findup ( process . cwd ( ) , configFile )
14+ . then ( function ( dir ) {
15+ configFilePath = path . join ( dir , configFile ) ;
16+ } )
17+ . then ( function ( ) {
18+ var app = new App ( ) ;
19+
20+ var config = new Configuration ( ) ;
21+ require ( configFilePath ) ( config ) ;
22+
23+ app . useConfiguration ( config ) ;
24+ app . start ( ) ;
25+ } ) ;
Original file line number Diff line number Diff line change 99 "compression" : " ~1.4.1" ,
1010 "errorhandler" : " ~1.3.4" ,
1111 "express" : " ~4.12.2" ,
12+ "findup" : " ^0.1.5" ,
1213 "fs-extra" : " ^0.16.5" ,
1314 "github" : " ^0.2.3" ,
1415 "grunt-cli" : " ^0.1.13" ,
4950 "start" : " grunt serve" ,
5051 "test" : " grunt style && mocha --color" ,
5152 "travis" : " grunt style && istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
53+ },
54+ "bin" : {
55+ "visualtesting-api" : " ./bin/start.js"
5256 }
5357}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments