sindresorhus / grunt-sass

Compile Sass to CSS
MIT License
1.01k stars 209 forks source link

path problem? #298

Closed volkanongun closed 3 years ago

volkanongun commented 4 years ago

my application silently fails and doesn't generate any css/scss files. I'm suspicious of files : [no files] log from verbose output.

grunt.config('sass', { sass: { options: { implementation: sass, sourceMap: true }, dist: { files: { 'tmp/app.css': 'src/sass/styles.scss' } } } });

my verbose grunt output :

Verifying property sass.sass exists in config...OK File: [no files] Options: precision=10, implementation={"info":"node-sass\t4.13.1\t(Wrapper)\t[JavaScript]\nlibsass \t3.5.4\t(Sass Compiler)\t[C/C++]","types":{},"TRUE":{},"FALSE":{},"NULL":{}}, sourceMap

node-sass 4.13.1 (Wrapper) [JavaScript] libsass 3.5.4 (Sass Compiler) [C/C++]

PascalAOMS commented 4 years ago

Got the same issue.

volkanongun commented 4 years ago

Lol i migrated to Parceljs, completely abandoned grunt.

PascalAOMS commented 4 years ago

Unfortunately I'm in the SAP Commerce environment. Can't quickly implement a JS bundler.

csloisel commented 4 years ago

After banging my head against a wall for a really long time with this i finally got it to work by removing the dist object.

So instead of: options: { dist: { files: {} } } I used options: { files: {} }

marcovtwout commented 3 years ago

@csloisel Perhaps you had the keys and options switched. Here's a working example with both generic options and dev/dist based.

sass: {
    options: {
        implementation: require('node-sass'),
    },
    dev: {
        options: {
            sourceMap: true
        },
        files: {
            'public/css/main.css': 'scss/main.scss'
        }
    },
    dist: {
        options: {
            outputStyle: 'compressed'
        },
        files: {
            'public/css/main.min.css': 'scss/main.scss'
        }
    },
},

Guess this issue can be closed.