Ayala
Ayala

Reputation: 117

How can I set that grunt compile all of scss to css in a folder?

I want that all scss files here:'sites/all/themes/uj/sass/*.scss'
be compiled here: sites/all/themes/uj/css/*.css'

The * doesn't work. Why? And what if I have other scss files in an other folder? Or my all scss files should be in the same folder?

This is my gruntfile.js:

module.exports = function(grunt) {
 // Project configuration.
 grunt.initConfig({
   pkg: grunt.file.readJSON('package.json'),
    connect: {
     uses_defaults: {}
   },
    sass: {
     dev: {
       options: { sourceMap: true },
       files: { 'sites/all/themes/uj/css/*.css' : 'sites/all/themes/uj/sass/*.scss' }
      }
   },
   watch: {
    css: {
      files: 'sites/all/themes/uj/**/*.scss',
      tasks: [ 'sass:dev' ],
      options: { livereload: true }
 }
}



 });
 // Load Grunt plugins
// grunt.loadNpmTasks('');
 // Default task(s).
 grunt.registerTask('default', []);



// Load Grunt plugins
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sass-globbing');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-cssmin');


};

Upvotes: 4

Views: 464

Answers (0)

Related Questions