0.1.1 • Published 8 years ago

grunt-katapult v0.1.1

Weekly downloads
1
License
-
Repository
github
Last release
8 years ago

grunt-katapult

Grunt-katapult has been released to upload "files on change" with FTP or SFTP. You can also deploy all files matching your selection.

Getting Started

This plugin requires Grunt >=0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-katapult --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-katapult');

You also need grunt-contrib-watch,jsftp and ssh2

Example watch config:

katapult: {
  watch: {
    options:{
      verbose:true,
      access:grunt.file.readJSON('remoteAccess.json'),
      dest: 'remoteDir/'
    }
  },
},
watch: {
  js:{
    files: ['test/**/*'],
    tasks: ['katapult:watch'],
    options: {
      spawn: false,
    }
  }
}

You have to use "watch" key for katapult configuration to work with grunt-contrib-watch.

Example deploy config:

katapult: {
  upload:{
    options:{
      verbose:true,
      access:grunt.file.readJSON('remoteAccess.json')
    },
    files: {
      'remoteDir/': ['localFiles/**/*']
    }
  }
},