Closed fatihacet closed 9 years ago
:+1: looking for this functionality right now
@vitvad For the current version I found the following workaround.
Define multiple targets for open
task in Gruntfile.
open :
dev :
path : 'http://localhost:1111/public/debug'
examples :
path : 'http://localhost:1111/build/docs/examples/'
coverage :
path : 'http://localhost:1111/build/coverage/PhantomJS 1.9.8 (Mac OS X)/lcov-report/index.html'
build :
path : 'http://localhost:2222/public/compiled'
Then call the multiple targets like this.
grunt.registerTask 'default', 'Run tests and watch the stack for changes', ->
grunt.task.run [
'coffee'
'karma:headless'
'http-server:debug'
'open:dev'
'open:coverage'
'watch'
]
@fatihacet , I try to open dynamically generated files (reports from test runner + coverage) so this will now fit to me.
@vitvad Also for the current version you can define your path as a function if you need. See this line. I wanted to mention when you say dynamic generated urls. In case you missed it.
@fatihacet , I saw that functionality. Here is example:
path: function () {
var reportPath = path.resolve(__dirname, '..', 'test/karma-report');
var filePath = walk(reportPath);
return filePath[0];
}
walk
return list of files in folder
folder structure: test\ -- karma-report\ -- -- Chrome version xx.xx.x\ -- -- -- index.html -- -- Phantom version xx.xx.x\ -- -- -- index.html
So open list of path could be useful. Anyway seems my case quite rare if no one else try to do this before :)
:) glad that you already figured it out.
ping
My changes converts string
dest
to a single item array to be backward compatible. If you pass an array of destination indest
config in Gruntfile, it will loop on that array and open those destinations one by one.Here is the screencast to screencast.