Adding ftpush to grunt watch?
Twansparant opened this issue · comments
Toine Kamps commented
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!
Boris Staal commented
You are not using watch
properly. Please refer to its documentation.