0

I want to compile all .scss files in my sass folder to a single .css file E:\SassToCss \sass \style1.scss \style2.scss \Want to have the compiled style.css in project root directory.

I tried the followings

sass: {
        dist: {
            files: {
                'style.css' : 'sass/*.scss'
            }
        }
    }

This is generating css for the first file only & ignoring rest of the files.

sass: {
dist: {
  files: [{
    expand: true,
    //cwd: 'styles',
    src: ['*.scss'],
    //dest: '../public',
    ext: '.css'
  }]
 }
}

This not generating my .css file. What's the correct way of doing so

so_user
  • 43
  • 1
  • 4

1 Answers1

0

Create a scss file, for example "style.scss" and use the @import tag for including other sass files.

Your sass compiler should take only style.scss to compile it in css

sass: {
        dist: {
            files: {
                'style.css' : 'sass/style.scss'
            }
        }
    }

See here for examples and better explanation: http://sass-lang.com/guide

Nikita Nikitin
  • 540
  • 1
  • 6
  • 20