Advertisement
Guest User

Untitled

a guest
Mar 1st, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. # Keep a reference so that we can kill it on process.exit
  2. leinProcess = null
  3.  
  4. # Workaround to start the Clojure frontend server.
  5. # This is needed when running E2E tests.
  6. gulp.task('lein-run-static', (cb) ->
  7.  
  8. leinProcess = spawn('lein', ['run-static'])
  9.  
  10. # Here we compare each output until the line telling us that the frontend server is
  11. # up running, then we know it's ready.
  12. leinProcess.stdout.on('data', (data) ->
  13.  
  14. line = data.toString().trim()
  15.  
  16. # Do not print some duplicate lines
  17. if !line.match(/Requiring external|Running for version|Using gulpfile/)
  18. # Do not use gutil.log otherwise we see double dates
  19. console.log(line)
  20.  
  21. if line.match(/Started SelectChannelConnector/)
  22. gutil.log('Frontend server started.')
  23. cb()
  24. )
  25.  
  26. if config.debug
  27. leinProcess.stderr.pipe(process.stderr)
  28.  
  29. # Make sure null is returned otherwise gulp will interpret leinProcess as
  30. # a gulp task stream
  31. return
  32. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement