Is there any good grunt ftp plugin?

Viewed 7800

I've tried grunt-ftpush and grunt-ftp-deploy but both doesn't work properly. I experience annoyning bugs with them. FTP task seems very important and it's weird that I can't google working one.

UPDATED

Here is settings for grunt-ftp

ftp: { 
  options: { 
    host: 'myhostname',
    user: 'myusername',
    pass: 'mypassword'
  },
  upload: { 
    files: { 
      'codebase/myprojectfolder': 'build/*' 
    }
  }
}

I expect that my local folder build will be copied to the server but I got an error

Fatal error: Unable to read "build/scripts" file (Error code: EISDIR).

Documentation is very poor, so I have no idea how to upload folders which has folders in it.

5 Answers

After following old or misinformation I was finally to get grunt-ftps-deploy to work for uploading individual files to a remote server inside a docker. Here is the grunt task:

ftps_deploy: {
        deploy: {
              options: {
                auth:{
                  host:'xx.xx.xx.xx',
                  authKey: 'key1',
                  port: 22,
                  secure: true
                },
                silent:false
                //progress: true
              },
              files: [{
                expand: true,
                cwd: './',
                src: ['./js/clubServices.js', './js/controllers.js', './css/services.css'],
                dest: '/data/media/com_memberservices/',
              }]
            }
    }

Initially I just received no files transferred response. The key to getting it working was specifying the "src" files correctly in an array. None of the information I found specifically addressed this issue. Hope this helps someone else. See update below

yoda57

Related