Index: Dev/trunk/src/Gruntfile.js
===================================================================
--- Dev/trunk/src/Gruntfile.js	(revision 452)
+++ Dev/trunk/src/Gruntfile.js	(revision 453)
@@ -1,2 +1,9 @@
+/***************************************
+ * This Gruntfile is organized with two phases,
+ * compile and build. Compile will lint HTML,
+ * JavaScript and compile LESS. The build phase
+ * creates an optimized stand-alone build that
+ * can be distributed.
+ */
 var fs = require('fs');
 var path = require('path');
@@ -4,14 +11,33 @@
 module.exports = function(grunt) {
 
+    var buildDir = '../build/';
+
     grunt.initConfig({
-        //pkg: grunt.file.readJSON('package.json'),
-        less: {
+        copy: {
+            build: {
+                files: [
+                    {src: ['client/*.html'], dest: buildDir},
+                    {src: ['server/**', '!**/node_modules/**'], dest: buildDir},
+                    {src: ['qed-server.key', 'qed-server.pem'], dest: buildDir},
+                ]
+            }
+        },
+        dojo: {
             options: {
-                strictImports: false,
-                dumpLineNumbers: "all"
+                dojo: 'client/dojo/dojo.js',
             },
-            all: {
+            build: {
+                options: {
+                    profile: 'client/client.profile.js'
+                }
+            }
+        },
+        htmlhint: {
+            options: {
+                htmlhintrc: ".htmlhintrc"
+            },
+            compile: {
                 files: {
-                    'client/qed-client/css/qed.css': 'client/qed-client/css/qed.less'
+                    src: ['client/*.html', 'client/qed-client/**.html']
                 }
             }
@@ -21,5 +47,5 @@
                 jshintrc: ".jshintrc"
             },
-            all: {
+            compile: {
                 files: {
                     src: ['client/qed-client/**/*.js', 'server/**.js', '!**/node_modules/**']
@@ -27,11 +53,12 @@
             }
         },
-        htmlhint: {
+        less: {
             options: {
-                htmlhintrc: ".htmlhintrc"
+                strictImports: false,
+                dumpLineNumbers: "all"
             },
-            all: {
+            compile: {
                 files: {
-                    src: ['*.html', 'client/qed-client/**.html', '!**/node_modules/**']
+                    'client/qed-client/css/qed.css': 'client/qed-client/css/qed.less'
                 }
             }
@@ -39,8 +66,13 @@
     });
 
+    grunt.loadNpmTasks('grunt-contrib-copy');
+    grunt.loadNpmTasks('grunt-contrib-jshint');
     grunt.loadNpmTasks('grunt-contrib-less');
-    grunt.loadNpmTasks('grunt-contrib-jshint');
+    grunt.loadNpmTasks('grunt-dojo');
     grunt.loadNpmTasks('grunt-htmlhint');
 
-    grunt.registerTask('default', ['less', 'jshint', 'htmlhint']);
+    grunt.registerTask('compile', ['less:compile', 'jshint:compile', 'htmlhint:compile']);
+    grunt.registerTask('build', ['compile', 'dojo:build', 'copy:build']);
+    grunt.registerTask('default', ['compile']);
+
 };
Index: Dev/trunk/src/client/client.profile.js
===================================================================
--- Dev/trunk/src/client/client.profile.js	(revision 453)
+++ Dev/trunk/src/client/client.profile.js	(revision 453)
@@ -0,0 +1,41 @@
+var profile = (function(){
+    return {
+        basePath: '.',
+        releaseDir: '../../build',
+        releaseName: 'client',
+        action: 'release',
+
+        layerOptimize: 'closure',
+        optimize: false,
+        cssOptimize: 'comments',
+        stripConsole: 'normal',
+
+        packages: [{
+            name: 'dojo',
+            location: 'dojo'
+        },{
+            name: 'dijit',
+            location: 'dijit'
+        },{
+            name: 'dojox',
+            location: 'dojox'
+        },{
+            name: 'qed-client',
+            location: 'qed-client'
+        }],
+
+        layers: {
+            'dojo/dojo': {
+                include: [ 'dojo/dojo' ],
+                customBase: true,
+                boot: true
+            },
+            'qed-client/index': {
+                include: [ 'qed-client/index' ]
+            },
+            'qed-client/response': {
+                include: [ 'qed-client/response' ]
+            }
+        }
+    };
+})();
Index: Dev/trunk/src/package.json
===================================================================
--- Dev/trunk/src/package.json	(revision 452)
+++ Dev/trunk/src/package.json	(revision 453)
@@ -5,6 +5,9 @@
   "devDependencies": {
     "grunt": "~0.4.0",
+    "grunt-contrib-copy": "~0.4.1",
+    "grunt-contrib-jshint": "~0.2.0",
     "grunt-contrib-less": "~0.5.0",
-    "grunt-contrib-jshint": "~0.2.0",
+    "grunt-dojo": "~0.2.3",
+    "grunt-exec": "~0.4.1",
     "grunt-htmlhint": "~0.4.0"
   }
