module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { dist: { files: { 'embed.min.js': 'embed.js' } } }, watch: { scripts: { files: ['embed.js'], tasks: ['uglify'] } } }); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.registerTask('default', ['watch']); };