-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from grmartin/grmartin/rewrite-1.0.0
[WIP] - ES6, Multiple Instances, General Cleanup.
- Loading branch information
Showing
10 changed files
with
675 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,34 @@ | ||
var gulp = require('gulp'), | ||
connect = require('../../index.js'); | ||
/* jshint esversion: 6, node: true */ | ||
'use strict'; | ||
|
||
const gulp = require('gulp'), | ||
connect = require('../../index.js'); | ||
|
||
gulp.task('connect', function _gulp_connect_task() { | ||
connect.server({ | ||
configCallback: function _configCallback(type, collection) { | ||
// If you wish to leave one of the argument types alone, simply return the passed in collection. | ||
if (type === connect.OPTIONS_SPAWN_OBJ) { // As the constant suggests, collection is an Object. | ||
connect.server({ | ||
configCallback: function _configCallback(type, collection) { | ||
// If you wish to leave one of the argument types alone, simply return the passed in collection. | ||
if (type === connect.OPTIONS_SPAWN_OBJ) { // As the constant suggests, collection is an Object. | ||
|
||
// Lets add a custom env var. Good for injecting AWS_RDS config variables. | ||
collection.env = Object.assign({ | ||
MY_CUSTOM_ENV_VAR: "env_var_value" | ||
}, process.env); | ||
// Lets add a custom env var. Good for injecting AWS_RDS config variables. | ||
collection.env = Object.assign({ | ||
MY_CUSTOM_ENV_VAR: "env_var_value" | ||
}, process.env); | ||
|
||
return collection; | ||
} else if (type === connect.OPTIONS_PHP_CLI_ARR) { // As the constant suggests, collection is an Array. | ||
var newArgs = [ | ||
'-e', // Generate extended information for debugger/profiler. | ||
'-d', 'memory_limit=2G' // Define INI entry, Up memory limit to 2G. | ||
]; | ||
return collection; | ||
} else if (type === connect.OPTIONS_PHP_CLI_ARR) { // As the constant suggests, collection is an Array. | ||
let newArgs = [ | ||
'-e', // Generate extended information for debugger/profiler. | ||
'-d', 'memory_limit=2G' // Define INI entry, Up memory limit to 2G. | ||
]; | ||
|
||
// Ensure our argument switches appear before the rest. | ||
return newArgs.concat(collection); | ||
} | ||
// Ensure our argument switches appear before the rest. | ||
return newArgs.concat(collection); | ||
} | ||
}, function _connected_callback(){ | ||
console.log("PHP Development Server Connected."); | ||
}); | ||
} | ||
}, function _connected_callback() { | ||
console.log("PHP Development Server Connected."); | ||
}); | ||
}); | ||
|
||
gulp.task('default', ['connect']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
var gulp = require('gulp'), | ||
connect = require('../../index.js'); | ||
/* jshint esversion: 6, node: true */ | ||
'use strict'; | ||
|
||
gulp.task('connect', function() { | ||
connect.server({}, function(){ | ||
// connected | ||
}); | ||
const gulp = require('gulp'), | ||
connect = require('../../index.js'); | ||
|
||
gulp.task('connect', function () { | ||
connect.server({}, function () { | ||
// connected | ||
}); | ||
}); | ||
|
||
gulp.task('default', ['connect']); |
Oops, something went wrong.