From 0a1d4b26457077afc9e58160086f3606883b49bf Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Tue, 25 Mar 2014 15:22:29 -0700 Subject: [PATCH 1/2] use grunt connect for development --- Gruntfile.js | 9 +++++++++ package.json | 1 + 2 files changed, 10 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index bea327ba8..8158e6dd4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -71,6 +71,14 @@ module.exports = function(grunt) { files: [ 'src/**/*', 'test/unit/*.js', 'Gruntfile.js' ], tasks: 'dev' }, + connect: { + dev: { + options: { + port: 9999, + keepalive: true + } + } + }, copy: { minor: { files: [ @@ -183,6 +191,7 @@ module.exports = function(grunt) { } }); + grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-watch'); diff --git a/package.json b/package.json index 2bf70b698..7a749d9c9 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "devDependencies": { "grunt-cli": "~0.1.0", "grunt": "~0.4", + "grunt-contrib-connect": "~0.7.1", "grunt-contrib-jshint": "~0.4.3", "grunt-contrib-watch": "~0.1.4", "grunt-contrib-qunit": "~0.2.1", From d1d97bfe9bab7031c797f01ec3bce767a3612789 Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Tue, 25 Mar 2014 15:38:32 -0700 Subject: [PATCH 2/2] update contributing doc with grunt commands --- CONTRIBUTING.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c38dfc0d6..4ec5596d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -183,15 +183,24 @@ cp sandbox/index.html.example sandbox/index.html open sandbox/index.html ``` -> #### NOTE: Testing Flash Locally in Chrome -> Chrome 21+ (as of 2013/01/01) doens't run Flash files that are local and loaded into a locally accessed page (file:///). + +### Testing Locally +A simple Connect server is available via the Grunt plugin. The commands below will allow you to setup a test sandbox and begin development. + +```bash +cp sandbox/index.html.example sandbox/index.html +grunt connect +open http://localhost:9999/sandbox/index.html +``` + +> NOTES regarding local testing in Chrome 21+ (as of 2013/01/01) +> Flash files that are local and loaded into a locally accessed page (file:///) will NOT run. > To get around this you can do either of the following: > -> 1. Do your development and testing using a local HTTP server. +> 1. Do your development and testing using a local HTTP server. See Grunt commands above. > > 2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead. - Commit and push changes as you go (using git directly). Write thorough descriptions of your changes in your commit messages. ```bash