diff --git a/Gruntfile.js b/Gruntfile.js index 8678f82..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,16 +19,16 @@ module.exports = function(grunt) { }, execute: { app: { - src: ["app.js"] + 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-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/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. 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 1266497..39ac6bd 100755 --- a/package.json +++ b/package.json @@ -8,20 +8,17 @@ "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" + "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", + "grunt-execute": "~0.2.2", + "grunt-open": "~0.2.3", + "load-grunt-tasks": "~3.1.0" } }