You can see below the API reference of this module.
Ruckasck
Creates a new instance of Ruckasck
.
- Object
opts
: The Rucksack options.
- Object The Rucksack instance.
Downloads the script from the resource file.
- String
resPath
: The path of the resource. - String
root
: The file's root path.
Downloads the JS scripts from the resource.
- String
resPath
: The path of the resource. - Boolean
inline
: Confirms if the resource needs to be downloaded or not.
Adds a new CSS path.
- String
resPath
: The CSS resource path to add. - Boolean
inline
: Whether to add the CSS content inline or not.
Bundles the JavaScript and CSS resources.
- Promise A promise object.
Creates an array of elements containing the resource type and the url.
E.g.:
[
{ type: "script", url: "https://.../myscript.js" },
...
{ type: "stylesheet", url: "https://.../mystyle.css" },
]
- Array The resources list.
Generates the HTML markup for CSS assets.
- String The HTML markup.
Generates the HTML markup for JS assets.
- String The HTML markup.
Generates the HTML for both CSS and JS assets. Optionally, a custom array can be provided.
- Array
resources
: An optional array of assets.
- String The HTML markup.