Skip to content

rse/grunt-princess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grunt-Princess

Grunt Task for executing XML/HTML to [PDF renderer PrinceXML via Node-Prince integration API.

Getting Started

This plugin requires Grunt ~0.4.0

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-princess --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks("grunt-princess");

Task Options

  • binary (default prince): corresponds to node-prince API function Prince#binary()

  • prefix (default ``): corresponds to node-prince API function Prince#prefix()

  • license (default ``): corresponds to node-prince API function Prince#license()

  • timeout (default 10000): corresponds to node-prince API function Prince#timeout()

  • cwd (default .): corresponds to node-prince API function Prince#cwd()

  • option (default {}): each key/value entry corresponds to node-prince API function Prince#option()

Task Calling

Run this task with the grunt princess command.

Task targets, files and options may be specified according to the Grunt Configuring tasks guide.

Usage Example

Assuming we have the following build environment:

  • Gruntfile.js:
// [...]
grunt.initConfig({
    "princess": {
        options: {
            license: "license.dat"
        },
        "user-manual": {
            options: {
                option: {
                    media: "print"
                }
            },
            src: [ "user-manual.html" ],
            dest: "user-manual.pdf"
        },
        "dev-manual": {
            options: {
                option: {
                    verbose: true
                }
            },
            src: [ "dev-manual.html" ],
            dest: "dev-manual.pdf"
        }
    }
});
grunt.registerTask("manuals", [ "princess:user-manual", "princess:dev-manual" ]);
// [...]

About

Grunt Task for running PrinceXML

Resources

License

Stars

Watchers

Forks

Packages

No packages published