tvooo / sublime-grunt

Moved to https://github.com/sptndc/sublime-grunt
296 stars 35 forks source link

Support for Vagrant and custom builds #37

Closed patrickheeney closed 5 years ago

patrickheeney commented 11 years ago

Right now I have to use the current build system which works ok but I'd rather use some features of your plugin. It would be great to be able to specify a custom command to run as well as declare other grunt tasks. Current setup:

    "build_systems":
    [
        {
            "name": "Grunt",
            "cmd": ["cd ${project_path:${folder}} && vagrant ssh -c \"cd /srv/www/ && grunt --no-color\""],
            "shell": true
        },
        {
            "name": "Grunt Build",
            "cmd": ["cd ${project_path:${folder}} && vagrant ssh -c \"cd /srv/www/ && grunt build --no-color\""],
            "shell": true
        }
    ]

So essentially I need to run cd ${project_path:${folder}} && vagrant ssh -c "cd /srv/www/ && grunt build" in order for my grunt commands to work. What do you think about a new setting so I could do something like this:

{
    "tasks": { "deafult", "build", "test" },
    "exec_cmd": "cd [project_path] && vagrant ssh -c \"cd /srv/www && [grunt]\"",
    "exec_args": {}
}

At runtime it could replace [project_path] with the current path and [grunt] with the commands you need to run for the plugin to work. The tasks option would allow grunt, grunt build, grunt test which I have setup like this:

  // Default task.
  grunt.registerTask('default', []);

  // Production build
  grunt.registerTask('build', []);

  // Test build
  grunt.registerTask('test', []);
tvooo commented 5 years ago

Repository was moved to https://github.com/sptndc/sublime-grunt Please re-file any issues that still exist.