grunt-static-player

0.0.17 • Public • Published

grunt-static-player npm version

Simply let you to generate static files based on json array.

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-static-player --save-dev

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

grunt.loadNpmTasks('grunt-static-player’);

To update the package on the registry

Tag with npm run tag then npm publish

The “static_player” task

Overview

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

grunt.initConfig({
  static_player: {
    options: {
      data: your_data_source_array, // the source array, yes you can load an external json file
      field_for_filename: 'filename', // the field key you want to use to name the generated files
      extension: 'html' // the file extension of the generated files
    },
 
    files: {
      'dest': 'test/template_1.html' // here you define the destination folder and the template file
    }
  },
});

Dependents (0)

Package Sidebar

Install

npm i grunt-static-player

Weekly Downloads

14

Version

0.0.17

License

none

Last publish

Collaborators

  • abusedmedia