sindresorhus / grunt-sass

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

Load module from grunt.loadNpmTasks #306

Closed Yuriy-Svetlov closed 3 years ago

Yuriy-Svetlov commented 3 years ago

Hello, @Richienb !

I would like to make a note:

Can be loaded without require('load-grunt-tasks')(grunt); use grunt.loadNpmTasks('grunt-sass');

const sass = require('node-sass');

grunt.initConfig({
    sass: {
        options: {
            implementation: sass,
            sourceMap: true
        },
        dist: {
            files: {
                'main.css': 'main.scss'
            }
        }
    }
});

grunt.loadNpmTasks('grunt-sass');

grunt.registerTask('default', ['sass']);
Richienb commented 3 years ago

I'm just a contributor, thank @sindresorhus instead.

sindresorhus commented 3 years ago

I'm aware it can be, it's just that load-grunt-tasks make it much easier when you have more than one task.