dasuchin / grunt-ssh-deploy

Grunt SSH Deployment
MIT License
66 stars 45 forks source link

Ignore files during deployment #27

Closed siamkreative closed 9 years ago

siamkreative commented 9 years ago

Hello there,

In most projects I use grunt-dploy to deploy my local projects. It has an option to exclude stuff. Normally, I exclude the following files and folders: like *.less, *.coffee, */node_modules.

What's the workflow with grunt-ssh-deploy? Also, I don't understand how you deal with the different releases folders that are created. I'd be grateful if you can provide further explanation :)

Thanks

lochstar commented 9 years ago

I deploy my dist directory, which contains a compressed production copy of my application that already has the files I don't need excluded.

hurricane766 commented 9 years ago

Same here, @lochstar

siamkreative commented 9 years ago

Thanks guys @lochstar @hurricane766!

I know this is a bit off topic, but is it a good practice to have a dist folder created with Grunt? Is there a great tutorial that explains how to structure the Gruntfile properly with tasks like contrib-concat, uglify, contrib-less, ssh-deploy?

lochstar commented 9 years ago

I have a task named grunt build that prepares my project for distribution. I have a series of tasks that are run one after another. e.g.

grunt.registerTask('build', 'Builds web app to dist directory', function() {
    grunt.log.writeln('Building webapp...');
    grunt.task.run([
        'clean:dist',
        'exec:translations',
        'string-replace:index',
        'requirejs',
        'clean:requirejs',
        'cachebreaker',
        'processhtml:dist',
        'copy:help',
        'less:dist',
        'uglify:dist'
    ]);
});