From 88435c447fb9e00e2da96c0e62be8dfbed31e185 Mon Sep 17 00:00:00 2001 From: Brendan Nee Date: Tue, 3 Mar 2015 18:15:21 -0800 Subject: [PATCH 1/5] Add grunt-open to auto-open server in dev --- Gruntfile.js | 10 ++++++++-- package.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8678f82..45a026c 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -19,14 +19,20 @@ module.exports = function(grunt) { app: { src: ["app.js"] } + }, + open : { + dev : { + path: 'https://localhost.intuit.com:34212' + } } }); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-open'); grunt.loadNpmTasks('grunt-execute'); grunt.registerTask('default', ['clean:dist', 'jshint', 'copy:dist']); - grunt.registerTask('dev', ['jshint', 'execute:app']); -}; \ No newline at end of file + grunt.registerTask('dev', ['jshint', 'open:dev', 'execute:app']); +}; diff --git a/package.json b/package.json index 1266497..8a21a7b 100755 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "jade": "~1.6.0", "grunt-execute": "~0.1.5", "cors": "~2.2.0" + "grunt-open": "~0.2.3", }, "devDependencies": { "grunt": "~0.4.2", From 261e068ebef83ccfbec0001d67ef5030fe2c4fb7 Mon Sep 17 00:00:00 2001 From: Brendan Nee Date: Tue, 3 Mar 2015 18:15:28 -0800 Subject: [PATCH 2/5] Dependency updates --- package.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 8a21a7b..2f70bb6 100755 --- a/package.json +++ b/package.json @@ -8,21 +8,21 @@ "url" : "http://gitlab.corp.intuit.net/qboplugins/starterplugin.git" }, "dependencies": { - "express": "4.9.x", + "express": "4.12.x", "morgan": "1.5.x", - "body-parser": "~1.8.1", - "cookie-parser": "~1.3.3", - "serve-favicon": "~2.1.3", - "debug": "~2.0.0", - "jade": "~1.6.0", - "grunt-execute": "~0.1.5", - "cors": "~2.2.0" + "body-parser": "~1.12.0", + "cookie-parser": "~1.3.4", + "serve-favicon": "~2.2.0", + "debug": "~2.1.2", + "jade": "~1.9.2", + "grunt-execute": "~0.2.2", "grunt-open": "~0.2.3", + "cors": "~2.5.3" }, "devDependencies": { - "grunt": "~0.4.2", - "grunt-contrib-jshint": "~0.6.3", - "grunt-contrib-copy": "~0.5.0", - "grunt-contrib-clean": "~0.5.0" + "grunt": "~0.4.5", + "grunt-contrib-jshint": "~0.11.0", + "grunt-contrib-copy": "~0.8.0", + "grunt-contrib-clean": "~0.6.0" } } From 90c62d10c87215321a69bbeacef1a997b29f0c59 Mon Sep 17 00:00:00 2001 From: Brendan Nee Date: Tue, 3 Mar 2015 18:15:35 -0800 Subject: [PATCH 3/5] Readme improvements --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index acda471..a3d07f5 100755 --- a/README.md +++ b/README.md @@ -10,16 +10,22 @@ Getting started with local development 1. Fork this repo and rename it to the name of your plugin. 1. Clone the repo to your local machine -1. Open the server.crt file in the sslcert folder and add it to your keychain/trusted cert store (this will allow you to run your browser with full security turned on) -1. Add the following to your hosts file (/etc/hosts on *nix) +1. Open the `server.crt` file in the `sslcert` folder and add it to your keychain/trusted cert store (this will allow you to run your browser with full security turned on) +1. Add the following to your hosts file (`/etc/hosts` on *nix) 127.0.0.1 localhost.intuit.com 1. Edit package.json and replace "Starter Plugin" with your own plugin name and repository location -1. Run "npm install" -1. Run "grunt dev" for development on https://localhost.intuit.com:34212 -1. A QBO Developer Sandbox account is recommended. Go to https://developer.intuit.com to get your free account. -1. After you create and log into your free sandbox account, go to this link https://sandbox.qbo.intuit.com/app/plugins/qbodeveloper +1. Install the dependencies + + npm install + +1. Start the local development task on https://localhost.intuit.com:34212 + + grunt dev + +1. A QBO Developer Sandbox account is recommended. [Get a free account]( https://developer.intuit.com). +1. After you create and log into your free sandbox account, visit https://sandbox.qbo.intuit.com/app/plugins/qbodeveloper 1. Click "Install" to install the qbo developer plugin 1. Visit the "Gear" menu and click "Company Settings". Find the Developer tab. 1. Add a new plugin with your own name (e.g. mycoolplugin). Notice it is marked "local storage". This means it will be configured on just your browser in its local storage. From eb9be3dfa19c8387a83d567b1ad07c3fb186c3cf Mon Sep 17 00:00:00 2001 From: Brendan Nee Date: Tue, 3 Mar 2015 18:41:19 -0800 Subject: [PATCH 4/5] Use load-grunt-tasks to load all npm tasks --- Gruntfile.js | 10 +++------- package.json | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 45a026c..ae489ed 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,6 @@ module.exports = function(grunt) { + require('load-grunt-tasks')(grunt); + grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { @@ -17,7 +19,7 @@ module.exports = function(grunt) { }, execute: { app: { - src: ["app.js"] + src: ['app.js'] } }, open : { @@ -27,12 +29,6 @@ module.exports = function(grunt) { } }); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-open'); - grunt.loadNpmTasks('grunt-execute'); - grunt.registerTask('default', ['clean:dist', 'jshint', 'copy:dist']); grunt.registerTask('dev', ['jshint', 'open:dev', 'execute:app']); }; diff --git a/package.json b/package.json index 2f70bb6..50a1110 100755 --- a/package.json +++ b/package.json @@ -24,5 +24,6 @@ "grunt-contrib-jshint": "~0.11.0", "grunt-contrib-copy": "~0.8.0", "grunt-contrib-clean": "~0.6.0" + "load-grunt-tasks": "~3.1.0" } } From 9a92d92ac83520bbde73cb90bed3431df0a94dbd Mon Sep 17 00:00:00 2001 From: Brendan Nee Date: Tue, 3 Mar 2015 18:41:47 -0800 Subject: [PATCH 5/5] Remove unused npm packages --- app.js | 2 +- package.json | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app.js b/app.js index c2a4673..feeaf26 100755 --- a/app.js +++ b/app.js @@ -1,5 +1,5 @@ var port = 34212; -var localServerName = "localhost.intuit.com:"+port; +var localServerName = "localhost.intuit.com:" + port; var express = require("express"); var morgan = require("morgan"); diff --git a/package.json b/package.json index 50a1110..39ac6bd 100755 --- a/package.json +++ b/package.json @@ -10,20 +10,15 @@ "dependencies": { "express": "4.12.x", "morgan": "1.5.x", - "body-parser": "~1.12.0", - "cookie-parser": "~1.3.4", - "serve-favicon": "~2.2.0", - "debug": "~2.1.2", - "jade": "~1.9.2", - "grunt-execute": "~0.2.2", - "grunt-open": "~0.2.3", "cors": "~2.5.3" }, "devDependencies": { "grunt": "~0.4.5", "grunt-contrib-jshint": "~0.11.0", "grunt-contrib-copy": "~0.8.0", - "grunt-contrib-clean": "~0.6.0" + "grunt-contrib-clean": "~0.6.0", + "grunt-execute": "~0.2.2", + "grunt-open": "~0.2.3", "load-grunt-tasks": "~3.1.0" } }