node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »


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:


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.



Type: Boolean Default: false

Whether an existing file should be replaced or not.


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"