I encountered an issue while attempting to concatenate and minify CSS using grunt. I included a myPage method/object, but I'm unsure how to initialize it. As a beginner in grunt tasks, I'm trying to learn and tackle this challenge.
Here's what I tried:
Gruntfile.js
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
myPage: {
concat: {
css: {
src: 'common/css/*.css',
dest: 'common/css/concat.css'
}
},
cssmin: {
css: {
src: 'common/css/concat.css',
dest: 'common/css/concat.min.css'
}
}
}
});
grunt.registerTask('devbuild', function() {
grunt.task.run(['concat:css','cssmin:css']);
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('build', ['devbuild']);
grunt.registerTask("default", ["build"]);
};