Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Yeoman and Tailbone

Doug edited this page Oct 17, 2013 · 5 revisions

Using Yeoman and Tailbone

Adding appengine config startup and background tasks to the Gruntfile.js

TODO

function proxySnippet(req, res) {
  return req.pipe(request('http://localhost:8080' + req.url))
            .pipe(res);
}

grunt.initConfig({
    yeoman: yeomanConfig,
    watch: {
      compass: {
        files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
        tasks: ['compass']
      },
      livereload: {
        files: [
          '<%= yeoman.app %>/{,*/}*.html',
          '.tmp/styles/{,*/}*.css',
          '<%= yeoman.app %>/{,*/}*.js',
          '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
        ],
        options: {livereload: true}
      }
    },
    connect: {
      options: {
        hostname: 'localhost',
        port: 9000,
      },
      livereload: {
        options: {
          middleware: function(connect) {
            return [
              require('connect-livereload')(),
              mountFolder(connect, '.tmp'),
              proxySnippet
            ];
          }
        }
      },
    },

bgShell: {
      websocket: {
        cmd: 'node ./tailbone/tailbone/mesh/websocket.js > /dev/null 2>&1',
        bg: true
      },
      tailbone: {
        cmd: 'dev_appserver.py tailbone/ 2>&1 |egrep "^(WARNING|ERROR|CRITICAL)"',
        bg: true
      },
      tailboneWaitHack: {
        cmd: 'sleep 3',
      },
      appCfgUpdateWithFolderHack: {
        cmd: 'mv app app.tmp; mv dist app; appcfg.py update tailbone; mv app dist; mv app.tmp app'
      }
    },
Clone this wiki locally