我有以下内容:
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']
}
}
}
);
};
具有以下文件夹结构: