grunt-assetpush

Grunt task for appending HTML tags for JS/CSS files

npm install grunt-assetpush
3 downloads in the last week
12 downloads in the last month

grunt-assetpush Build Status

Append HTML tags for JS/CSS files.

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

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

grunt.loadNpmTasks("grunt-assetpush");

Assetpush task

Run this task with the grunt assetpush command.

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

Options

overwrite

Type: Boolean Default: false

Whether an existing file should be replaced or not.

encoding

Type: String Default: utf8

What encoding should be used when writing the HTML tags.

Usage examples

assetpush: {
    js: {
        files: {
            "path/to/scripts.html": ["path/to/*.js", "another/path/to/file.js" ]
        }
    },
    css: {
        files: {
            "path/to/styles.html": "path/to/styles.css"
        }
    }
}
npm loves you