   grunt.loadNpmTasks 'grunt-contrib-uglify'
   grunt.loadNpmTasks 'grunt-contrib-watch'
 
-  grunt.registerTask 'default', ['watch']
-  grunt.registerTask 'build',   ['coffee', 'jshint', 'concat']
+  grunt.registerTask 'default',      ['watch']
+
+  grunt.registerTask 'build:core',   ['clean:core', 'coffee:core', 'jshint:core', 'concat:core']
+  grunt.registerTask 'build:ui',     ['clean:ui', 'coffee:ui', 'jshint:ui', 'concat:ui']
+  grunt.registerTask 'build',        ['build:core', 'build:ui']


    # Cleans build folders
    clean: {
      scripts: ['build/scripts'],
      styles:  ['build/styles']
    },

    # Compiles CoffeeScript source
    coffee: {
      all: {
        expand: true,
        cwd: 'src',
        src: '**/*.coffee',
        dest: 'build',
        ext: '.js',
        options: {
          bare: true
        }
      }
    },


        eqnull: true,
        shadow: true
      },
      core: {
        src: [
          'build/scripts/**/*.js',
          '!build/scripts/<%= pkg.name %>/ui.js',
          '!build/scripts/<%= pkg.name %>/ui/**/*.js'
        ]
      },
      ui: {
        src: [
          'build/scripts/<%= pkg.name %>/ui.js',
          'build/scripts/<%= pkg.name %>/ui/**/*.js'
        ]
      }
    },

    # Minified distribution
