grunt-zoopinator

Grunt plugin for Zoopinator

grunt-zoopinator

Grunt plugin for Zoopinator static site generator

This plugin requires Grunt ~0.4.1

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

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

grunt.loadNpmTasks('grunt-zoopinator');

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

grunt.initConfig({
  zoopinator: {
    options: {
      // Task-specific options go here. 
    },
    your_target: {
      // Target-specific file lists and/or options go here. 
    },
  },
})

Type: Boolean Default value: false

A boolean value that controls the amount of text displayed while running zoopinator

Type: Boolean Default value: true

A boolean value that controls if zoopinator will abort on the first error

Type: Boolean Default value: true

A boolean value that controls if zoopinator will auto escape output

Type: String Default value: utf8

A string value that sets the encoding used when reading in template files

Type: Integer Default value: 0

The timezone offset that SWIG uses for data calculations

Type: String Default value: ``

A string value that specifies an alernate root for the SWIG engine to use as the root when resovling template paths

Type: Boolean Default value: false

A boolean value that if true will override the confirmation when creating files outside of the dest folder

Here is a sample Gruntfile using grunt-zoopinator. The task has two targets - dev and prod enabling you to test in the dev directory and then use the prod directory as a git repo to deploy your site. The watch task will keep the dev directory up to date after any file change.

module.exports = function(grunt) {

  // Add our custom tasks.
  grunt.loadNpmTasks('grunt-zoopinator');
  grunt.loadNpmTasks('grunt-contrib-watch');
  
  // Project configuration.
  grunt.initConfig({
    zoopinator: {
      options: {
        verbose: false
      },
      dev: {
        src: 'site-templates/',
        dest: '../dev/site/'
      },
      prod: {
        src: 'site-templates/',
        dest: '../prod/site/'
      }
    },
    watch: {
      files: ['site-templates/**/*.*'],
      tasks: ['zoopinator:dev']
    }
  });

  // Default task.
  grunt.registerTask('default', ['zoopinator:dev']);
};

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.

(Nothing yet)