grunt-box-view
Box View API grunt tasks
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-box-view --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "boxview-upload" task
Upload a document to the View API
Overview
In your project's Gruntfile, add a section named boxview-upload
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.file
Type: String
Default value: null
A string value of a local file to upload.
options.url
Type: String
Default value: null
A string value of a URL to a file to upload.
options.uploadOptions
Type: Object
Default value: {}
An object representing the upload parameters to use (see node-box-view docs for more details).
The "boxview-session" task
Create a session for a document on the View API
Overview
In your project's Gruntfile, add a section named boxview-session
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.documentId
Type: String
Default value: null
A string value of the document id to use when creating the session.
options.sessionOptions
Type: Object
Default value: {}
An object representing the session parameters to use (see node-box-view docs for more details).
The "boxview-view" task
Upload and create a session for a document on the View API
Overview
In your project's Gruntfile, add a section named boxview-view
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.file
Type: String
Default value: null
A string value of a local file to upload.
options.url
Type: String
Default value: null
A string value of a URL to a file to upload.
options.uploadOptions
Type: Object
Default value: {}
An object representing the upload parameters to use (see node-box-view docs for more details).
options.sessionOptions
Type: Object
Default value: {}
An object representing the session parameters to use (see node-box-view docs for more details).
The "boxview-list" task
List documents uploaded to the View API
Overview
In your project's Gruntfile, add a section named boxview-list
to the data object passed into grunt.initConfig()
.
grunt;
Options
options
An object representing the list parameters to use (see node-box-view docs for more details).
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.