Inserting the contents of external CSS and JavaScript files directly into the HTML document.
Getting Started
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-assetser --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-assetser');
The assetser task
Run this task with the grunt assetser command.
Task targets, files and options may be specified according to the Grunt Configuring tasks guide.
Options
options.assetsDir (required)
Type: String Default: empty string
This string will be used as the path to the resources that will be added in the HTML files. This is a required parameter!
options.onlyMarked
Type: StringBoolean Default: false
Add only those files that contain in its name, the specified string.
If you choose true, then will be used value ._inline.
options.onlyType
Type: String Default: empty string
Add only files the type specified by in this parameter. Supported: js, css.
options.verbose
Type: Boolean Default: true
Display information about the processed files.
Running "assetser:default_options" (assetser) task>> The file tmp/default.html has been successfully created.>> The file tmp/default_tab.html has been successfully created.