Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Keep a reference so that we can kill it on process.exit
- leinProcess = null
- # Workaround to start the Clojure frontend server.
- # This is needed when running E2E tests.
- gulp.task('lein-run-static', (cb) ->
- leinProcess = spawn('lein', ['run-static'])
- # Here we compare each output until the line telling us that the frontend server is
- # up running, then we know it's ready.
- leinProcess.stdout.on('data', (data) ->
- line = data.toString().trim()
- # Do not print some duplicate lines
- if !line.match(/Requiring external|Running for version|Using gulpfile/)
- # Do not use gutil.log otherwise we see double dates
- console.log(line)
- if line.match(/Started SelectChannelConnector/)
- gutil.log('Frontend server started.')
- cb()
- )
- if config.debug
- leinProcess.stderr.pipe(process.stderr)
- # Make sure null is returned otherwise gulp will interpret leinProcess as
- # a gulp task stream
- return
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement