jgable / grunt-qunit-serverless

A serverless version of the grunt-qunit task.
4 stars 2 forks source link

Allow a new argument, "build", to be passed through a task to get just the output of the built files. #8

Closed geedew closed 11 years ago

geedew commented 11 years ago

This allows built files to be handled differently than just running phantom, and even moved to a more convenient spot.

Here is an example SH file that would work with this process (where "all" is the task options in the Gruntfile.js).

'''
#!/bin/sh
myvar=$(echo $(grunt qunit-serverless:all:build) | awk '{print $5}')
echo $myvar
''''
jgable commented 11 years ago

I prefer an option based approach over the task arguments. And I'd like to move the logic into the run command instead of the register function so it can be tested better.

I'm going to merge in and make those changes.

jgable commented 11 years ago

You can pass the buildOnly: true option to get the same effect now. I added a unit test to confirm. The diff of your code is https://github.com/jgable/grunt-qunit-serverless/commit/435c0c1930f1d5c6bc8ccdebfa5a4c0de5643753.

jgable commented 11 years ago

This is now published on npm as version 0.2.6.