gruntjs / grunt-contrib-compass

Compile Compass to CSS.
http://gruntjs.com/
MIT License
626 stars 128 forks source link

Have to resave scss files twice in order for update to trigger #253

Open mcclaskiem opened 8 years ago

mcclaskiem commented 8 years ago

I recently upgrade my whole grunt workflow to ^1.0.0 and after doing so I know have to save a scss partial twice before it properly compiles and trigger live reload.

I am on version 1.1.1 and I have compass version 1.0.3

  "devDependencies": {
    "grunt": "^1.0.0",
    "grunt-contrib-uglify": "^1.0.0",
    "grunt-contrib-compass": "^1.0.0",
    "grunt-contrib-imagemin": "^1.0.0",
    "grunt-concurrent": "^2.0.0",
    "grunt-contrib-jshint": "^1.0.0",
    "grunt-svgmin": "^3.0.0",
    "grunt-contrib-cssmin": "^1.0.0",
    "grunt-contrib-watch": "~1.0.0",
    "connect-livereload": "^0.5.0",
    "grunt-contrib-connect": "^1.0.0",
    "grunt-newer": "^1.1.0",
    "grunt-contrib-htmlmin": "^1.3.0",
    "grunt-contrib-copy": "^1.0.0",
    "grunt-modernizr": "^1.0.0"
  }
compass: {                  // Task
   default: {                    // Another target
      options: {
        config: 'config.rb'
      }
   }
},
sass:{
   options:{
      livereload: false,
   },
   files: ['build/sass/**/*.scss'],
   tasks: ['compass'],
},

Please let me know if you need any more information to shed some light on the issue.

I did test this on an old project with pre 1.0.0 dev dependencies and it works as expected.

foxdog05000 commented 6 years ago

+1

foxdog05000 commented 6 years ago

I solved this problem by modifying the compass task in the watch object configuration of the gruntfile. I'm use Grunt in version 1.0.1 with Grunt-contrib-compass in version 1.1.1. Compass in version 1.0.3.

Before

  compass: {
        files: ['<%= yeoman.app %>/views/{,*/}*.{scss,sass}'],
        tasks: ['compass:server', 'postcss:server']
      },

After

  compass: {
        files: ['<%= yeoman.app %>/views/**/*.{scss,sass}'],
        tasks: ['compass:server', 'postcss:server']
      },

{,*/} This is my problem. And solved on replace by **.