Using yoman with a trigger

I am trying to use trigger.io along with yoman. I am using yoman for the whole build cycle (app / testing angularjs / .. backings) and trigger.io for deployment.
Trigger.io generates everything in 'src' and yoman everything in the 'app' directory.

Is there a way to get Trigger.io to write to the "application" and not to the "src" directory?

Edit this seems to work, but not very doable as it requires keeping track of new directories / files created by yoman:

  • ln -s app / index.html index.html
  • ln -s style of styles / styles
  • ln -s application / script scripts
  • : continue with something relevant
+3


source to share


1 answer


I ended up symbolic binding dist

before src

because we need Yeoman to collect SCSS and CoffeScript files. The wreckage here yeoman server

cannot be started when you yeoman build

create a directory dist

. Also, bummerish is when you do it yeoman server

again, it cleans up the directory dist

.

I plan to work on creating a youma generator for the generator for the trigger, as well as to add some grunt tasks that simulate the problem Rakefile

that I created for testing and developing with Sinatra (eg yeoman simulator

, yeoman device

, yeoman testflight

).

change . I added several tasks directly to mine gruntfile.js

. I have added grunt-contrib-copy

and added the following sub-tasks.

copy: {
  app: {
    files: {
      "src/": "app/**",                 // core app files
    },
  },
  compass: {
    files: {
      "src/styles/": "temp/styles/**",  // drop in the compiled coffeescript
    }
  },
  coffee: {
    files: {
      "src/scripts/": "temp/scripts/**" // drop in the compiled scss
    }
  }
},

      

I added these tasks to their respective watch commands and added a new watch to view the directory app

.

watch: {
  coffee: {
    files: 'app/scripts/**/*.coffee',
    tasks: 'coffee copy:coffee reload'
  },
  compass: {
    files: [
      'app/styles/**/*.{scss,sass}'
    ],
    tasks: 'compass copy:compass reload'
  },
  app: {
    files: [
      'app/**/*.{html,png,json,css,js}'
    ],
    tasks: 'copy:app'
  },
}

      

Now yeoman server

that calls yeoman watch

is updating src

.



I am also led grunt-shell

to do the following.

shell: {
  forge_build: {
      command: 'forge build ios 2>&1 | tee output',
      stdout: true
  },
  forge_run_device: {
      command: 'forge run ios --ios.device device',
      stdout: true
  },
  forge_run: {
      command: 'forge run ios',
      stdout: true
  }
}

      

And create some tasks like:

grunt.registerTask("sim", 'copy shell:forge_build shell:forge_run');
grunt.registerTask("device", 'copy shell:forge_build shell:forge_run_device');

      

I'm not entirely happy with this, but it allows me to work yeoman server

and go to console elsewhere and run yeoman device

to bring it up to the device. it also keeps the directory src

in a location where it can be checked.

Eventually I'll translate this into a yoman plugin and add some more specific build tasks to clear the dir for src for a suitable target (e.g. iOS, Android) to reduce the size of the dir.

edit: I created grunt-forge

to help run forge

from within Yeoman. I've also written a bit about generating more accurate output for `forge .

+2


source







All Articles