Download external changes that do not work with GRUNT

I started using gruntjs today. Created all the necessary files, etc. Here is my Gruntfile.js:

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    concat: {
      options: {
        separator: "\n"
      },
      dist: {
        src: ['js/lib/*.js','js/main.js'],
        dest: 'js/script.js'
      }
    },
    sass: {
      dist: {
        options: {
          style: 'compressed'
        },
        files: {                                    // Dictionary of files
          'css/style.css': 'css/style.scss'         // 'destination': 'source'
        }
      }
    },
    uglify: {
      options: {
        sourceMap : true,
        mangle : false
      },
      my_target: {
        files: {
          'js/script.min.js': ['js/script.js']
        }
      }
    },
    watch: {
      css: {
        files: ['css/*.scss'],
        tasks: ['sass']
      },
      scripts: {
        files: ['js/lib/*.js','js/youtube.js','js/main.js'],
        tasks: ['concat', 'uglify']
      }
    }
  });

  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-sass');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');

  // Default task(s).
  grunt.registerTask('default', ['watch']);

};

and it works great. But there is one little thing in my PHPstorm (running under osx): GruntJS does make changes, but they don’t load on the server I'm attached to. I have an automatic download and "Download external changes", but nothing happens anyway.

Could you help me somehow? Thanks in advance!

Ps When using PHPStorm file watchers (scss watcher), "Upload external changes" works, and the files are uploaded to the server, but after switching to GruntJS there was a problem.

+4
2

(v8) PHPStorm.

PHPStorm 10 !!!

0

BTW, File > Synchronize , , " ", , .

, , , PHPStorm , .

, .

0

Source: https://habr.com/ru/post/1617761/


All Articles