grunt example gruntfile js

Solutions on MaxInterview for grunt example gruntfile js by the best coders in the world

showing results for - "grunt example gruntfile js"
Oscar
04 Jul 2020
1module.exports = function(grunt) {
2
3  // Project configuration.
4  grunt.initConfig({
5    pkg: grunt.file.readJSON('package.json'),
6    uglify: {
7      options: {
8        banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
9      },
10      build: {
11        src: 'src/<%= pkg.name %>.js',
12        dest: 'build/<%= pkg.name %>.min.js'
13      }
14    }
15  });
16
17  // Load the plugin that provides the "uglify" task.
18  grunt.loadNpmTasks('grunt-contrib-uglify');
19
20  // Default task(s).
21  grunt.registerTask('default', ['uglify']);
22
23};