Created
May 26, 2016 08:33
-
-
Save mikeymckay/160c386c2471c1c508cd6941ab019561 to your computer and use it in GitHub Desktop.
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
request = require 'request' | |
glob = require 'glob' | |
_ = require 'underscore' | |
database = process.argv.pop() | |
glob "**/*.coffee", (er, files) -> | |
_(files).each (view) -> | |
return if view.match(/__reduce/) or view is "executeViews.coffee" | |
view_name = view.replace(/\.coffee/,"") | |
viewUrl = "#{database}/_design/#{view_name}/_view/#{view_name}?limit=1" | |
console.log "Executing view: #{viewUrl}" | |
request viewUrl, (result) -> | |
console.log "Finished #{viewUrl}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment