diff --git a/.gitignore b/.gitignore index 482a6b15db..7595351a09 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ Thumbs.db # ignore compiled files /dist +/src/.index.html /src/styles/brackets.css # ignore everything in the dev extension directory EXCEPT the README diff --git a/Gruntfile.js b/Gruntfile.js index faef9690cd..9d6665912c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,7 @@ module.exports = function (grunt) { 'use strict'; // load dependencies - require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-usemin']}); + require('load-grunt-tasks')(grunt, {pattern: ['grunt-contrib-*', 'grunt-targethtml', 'grunt-usemin']}); grunt.loadTasks('tasks'); var common = require("./tasks/lib/common")(grunt); @@ -34,11 +34,23 @@ module.exports = function (grunt) { grunt.initConfig({ pkg : grunt.file.readJSON("package.json"), clean: { - dist: ['dist'] + dist: { + files: [{ + dot: true, + src: [ + 'dist', + 'src/.index.html', + 'src/styles/brackets.css' + ] + }] + } }, copy: { dist: { files: [ + { + 'dist/index.html': 'src/.index.html' + }, /* static files */ { expand: true, @@ -49,7 +61,8 @@ module.exports = function (grunt) { 'nls/{,*/}*.js', 'xorigin.js', 'dependencies.js', - 'thirdparty/requirejs/require.js' + 'thirdparty/requirejs/require.js', + 'LiveDevelopment/launch.html' ] }, /* extensions and CodeMirror modes */ @@ -108,11 +121,18 @@ module.exports = function (grunt) { } } }, + targethtml: { + dist: { + files: { + 'src/.index.html': 'src/index.html' + } + } + }, useminPrepare: { options: { dest: 'dist' }, - html: 'src/index.html' + html: 'src/.index.html' }, usemin: { options: { @@ -272,8 +292,9 @@ module.exports = function (grunt) { // Default task. grunt.registerTask('default', [ 'test', - 'less', 'clean', + 'less', + 'targethtml', 'useminPrepare', 'htmlmin', 'requirejs', diff --git a/package.json b/package.json index f45f31eee5..38c413e44d 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "grunt-contrib-uglify": "0.2.0", "grunt-contrib-concat": "0.3.0", "grunt-contrib-watch": "0.4.3", + "grunt-targethtml": "0.2.6", "grunt-usemin": "0.1.11", "load-grunt-tasks": "0.2.0", "q": "0.9.2", diff --git a/src/brackets.js b/src/brackets.js index 5c87a2b2b1..6a96ddc0cb 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -375,6 +375,5 @@ define(function (require, exports, module) { // Dispatch htmlReady event _beforeHTMLReady(); AppInit._dispatchReady(AppInit.HTML_READY); - $(window.document).ready(_onReady); }); diff --git a/src/config.json b/src/config.json index 973bd4be8e..7d06c18808 100644 --- a/src/config.json +++ b/src/config.json @@ -49,6 +49,7 @@ "grunt-contrib-requirejs": "0.4.1", "grunt-contrib-uglify": "0.2.0", "grunt-contrib-concat": "0.3.0", + "grunt-targethtml": "0.2.6", "grunt-usemin": "0.1.11", "load-grunt-tasks": "0.2.0", "q": "0.9.2", diff --git a/src/index.html b/src/index.html index 2ae9f3ae61..1ff31ada44 100644 --- a/src/index.html +++ b/src/index.html @@ -32,12 +32,16 @@ - + + + + +