inossidabile / grunt-ftpush

Grunt task for incremental code deployment over ftp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding ftpush to grunt watch?

Twansparant opened this issue · comments

Hi there,

I'm fairly new to grunt and ftpush and I'm currently looking for a way to automatically upload my compiled css and js files to the server when my less files or main javascript have changed.

So in my Gruntfile.js I added this at the bottom:

grunt.loadNpmTasks('grunt-ftpush');

and this in the watch task:

grunt.initConfig({
    watch: {
      // other watch tasks
      ftpush: {
        build: {
          auth: {
            host: 'ftp.mydomain.com',
            port: 21,
            authKey: 'dev'
          },
          src: 'assets/test/',
          dest: '/assets/test/'
        }
      }
    },
  });

But I keep getting the following error when I run grunt watch:

Running "watch" task
Waiting...Verifying property watch.ftpush.files exists in config...ERROR
>> Unable to process task.
Warning: Required config property "watch.ftpush.files" missing.

I tried adding simple: true but that doesn't help.
Am I missing something? Thanks!

You are not using watch properly. Please refer to its documentation.