Allow "connect-like" object to be passed to grunt-express as the "server"#67
Open
benhutchins wants to merge 2 commits intoblai:masterfrom
Open
Allow "connect-like" object to be passed to grunt-express as the "server"#67benhutchins wants to merge 2 commits intoblai:masterfrom
benhutchins wants to merge 2 commits intoblai:masterfrom
Conversation
…ver" rather than just a string.
Author
|
I've revised my pull request. I was copying my changes from my node_modules/grunt-express to my grunt-express checkout. Attempted to run the unit tests within the project but they timed out, and Travis is failing, so was didn't test my copy. I originally had the |
benhutchins
added a commit
to vistaprint/grunt-js-test
that referenced
this pull request
Aug 7, 2014
… grunt-express until blai/grunt-express#67 is merged.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow "connect-like" object to be passed to grunt-express as the "server" rather than just a string.
This allows for grunt to pass configuration to the server, such as things from grunt.option or whatever it desires, and then build out the server and pass back the ready-object.
My use case for this is that I am building a grunt plugin which performs client-side unit testing. This plugin consumes grunt-express to start a localhost web server which generates the HTML pages for the tests. I want to pass in the list of dependencies for each test file to the web server from Grunt, or at least the paths where the test files live which are configured in the user's Gruntfile.js - currently there is no way for me to pass data to the server.js from grunt-express.
An example of how to use this:
Gruntfile.js
testEnvironment.js - grunt task consuming grunt-express
server.js
Currently there would be no way to pass configuration to the server prior to it starting. This allows that to happen. There are existing hooks to pass in middleware from grunt, but no way to do more advanced configuration. This allows the system to be a lot more robust.