相关疑难解决方法(0)

Grunt - 在更改时观察文件和SFTP

我正在尝试自动上传.css文件,当它是从Sass编译的时候.这就是我的意思Gruntfile.js:

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    watch: {
      coffee: {
        files: ['**/*.coffee'],
        tasks: ['coffee']
      },
      scripts: {
        files: ['**/*.scss'],
        tasks: ['compass']
      },
      sftp: {
        files: ['**/*.css'],
        tasks: ['sftp-deploy']
      }
    },
    coffee: {
      compile: {
        files: {
          'testing.js': 'testing.coffee'
        }
      }
    },
    compass: {
      dist: {
        options: {
          config: 'config.rb'
        }
      }
    },

    'sftp-deploy': {
      build: {
        auth: {
          host: 'example.com',
          port: 22,
          authKey: 'key2'
        },
        src: 'styles/',
        dest: 'styles/',
        exclusions: ['**/.DS_Store'], …
Run Code Online (Sandbox Code Playgroud)

sftp sass watch gruntjs

7
推荐指数
1
解决办法
4601
查看次数

标签 统计

gruntjs ×1

sass ×1

sftp ×1

watch ×1