相关疑难解决方法(0)

使用 grunt 找不到任务

我正在尝试在 grunt 中使用多个任务,其中一个是部分工作,另一个是not found task.

这个问题基于this one,我使用gruntfile.js相同的结构,这是这样的:

??? Gruntfile.js
??? grunt
    ??? config
    ?   ??? conf_sass.js
    ?   ??? conf_home.js
    ??? register
        ??? reg_sass.js
        ??? reg_home.js
Run Code Online (Sandbox Code Playgroud)

有了这个各自的文件:

conf_sass.js

module.exports = function(grunt) {
    grunt.config.set('sass', {

        sass: {
            options: {
                style:'expanded',
                compass: true
            },
            files: {
                'src/css/app.css' : 'src/sass/app.scss'
            }
        },
        cssmin: {
            options: {
                shorthandCompacting: false,
                roundingPrecision: -1
            },
            target: {
                files: {
                    'dist/css/app.min.css': 'src/css/app.css'
                }
            }
        }

    });

    grunt.loadNpmTasks('grunt-contrib-sass');
    grunt.loadNpmTasks('grunt-contrib-cssmin');
};
Run Code Online (Sandbox Code Playgroud)

reg_sass.js

module.exports = function(grunt) …
Run Code Online (Sandbox Code Playgroud)

javascript node.js gruntjs

3
推荐指数
1
解决办法
9243
查看次数

标签 统计

gruntjs ×1

javascript ×1

node.js ×1