# Grunt and uglify

**URL:** https://forum.kirupa.com/t/grunt-and-uglify/331297
**Category:** web dev
**Created:** [July 1, 2013, 2:58pm UTC](https://forum.kirupa.com/t/grunt-and-uglify/331297 "2013-07-01T14:58:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)
#### Post date: [July 1, 2013, 2:58pm UTC](https://forum.kirupa.com/t/grunt-and-uglify/331297/1 "2013-07-01T14:58:45Z")

</div>

Heya - anyone using grunt here?

Grunt is fairly easy to handle - but still gets me in knots. ☹

I am trying to get uglify to work. And nope - I cannot do it.

I AM loading in all the dependancies into my Gruntfile.js. I am using grunt-contrib-watch and grunt-contrib-uglify.

Below is the guts of my initConfig code which is realising that a file is changing - but it’s not kicking in the compression.

```auto
uglify: {
         build: {
            src: 'js/offreg.js',
            dest: 'js/offreg.min.js'
          }
},
watch: {
    uglify:{
        files: 'js/offreg.js',
        tasks: 'uglify'
    }
}

```

How do I use uglify!? There is no actual cohesive example in the github page.
