Grunt没有输出main.js

时间:2016-03-19 19:20:52

标签: gruntjs

我有以下内容:

module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-sass');

    // Project configuration.
    grunt.initConfig({
        pkg: '<json:package.json>',
        concat: {
            options: {
              outputStyle: 'minified',
            },
            dist: {
              src: [
                    'js/jquery.min.js', 
                    'js/foundation.min.js',     
                    'js/header.js'
                    ],
              dest: 'js/main.js',
            },
            dist: {
                src: [
                        'scss/foundation.css', 
                        'scss/footer.scss', 
                        'scss/header.scss', 
                        'scss/off_canvas_custom.scss', 
                        'scss/projects_panel.scss', 
                        'scss/typography.scss'
                    ],
                dest: 'css/app.css',
            }
        },
        watch: {
            scripts: {
              files: [
                        'js/jquery.min.js', 
                        'js/foundation.min.js', 
                        'js/header.js'
                        ],
              tasks: ['concat']
            },

            styles: {
                files: [
                        'scss/foundation.css', 
                        'scss/footer.scss', 
                        'scss/header.scss', 
                        'scss/off_canvas_custom.scss', 
                        'scss/projects_panel.scss', 
                        'scss/typography.scss'
                    ],
                tasks: ['concat']
            }
        }

    }

);
};

具有以下文件夹结构:

  1. 的index.html
    • JS​​
    • header.js
    • jquery的
    • 基础
    • CSS
    • 的package.json
  2. 以及更多文件

    输入我的终端&#34; grunt watch&#34;我在header.js enter image description here

    中做了一些更改

    main.js根本没有输出。它假设在JS文件夹中输出

0 个答案:

没有答案
相关问题