grunt-rebound

0.3.1 • Public • Published

Rebound Logo

grunt-rebound

Easily compile your Rebound templates using Grunt.

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

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

grunt.loadNpmTasks('grunt-rebound');

The "rebound" task

Overview

In your project's Gruntfile, add a section named rebound to the data object passed into grunt.initConfig().

grunt.initConfig({
  rebound: {
    compile:{
      options: {
        baseUrl: 'views/',
        baseDest: 'templates/'
      },
      src: ['views/**/*', '!views/layouts/**', '!views/emails/**'],
      dest: 'public/templates'
    }
  }
});

Options

options.baseUrl

Type: String Default value: ''

The root folder that all your uncompiled Rebound templates' HTML <import> tags are relative to. Ex: If your templates are all in the directory /views and your HTML import tags are written relative to that directory, then your baseUrl is views/. Please note the trailing slash.

options.baseDest

Type: String Default value: ''

A string value that is prefixed to all of your compiled Rebound templates' dependancy paths. Should be set to the directory path in your pubilc directory that the templates are installed. Ex: If your public directory is /public and your templates are compiled to /public/templates then your baseDest will be templates/. Please note the trailing slash.

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.

Package Sidebar

Install

npm i grunt-rebound

Weekly Downloads

1

Version

0.3.1

License

none

Last publish

Collaborators

  • epicmiller
  • reboundjs