===============
Inline commands
===============
Bundles can be created with these *HTML* tag names.
- **saveAs**: html + script + link + raw assets
- **exportAs**: script + style
- **exclude**: script + link + style
*JS* and *CSS* files with the same path and filename will automatically create a bundle when there are no conflicts in call ordering. [#]_
data-chrome-file
================
1. path/filename
a. saveAs [#]_
b. exportAs
2. ``::``
3. format... [#]_
.. highlight:: html
.. code-block::
:caption: JSON [#]_
.. code-block::
:caption: Key-Value [#v523]_
.. code-block::
:caption: Inline (legacy)
.. code-block::
:caption: Output
data-chrome-options
===================
* preserve [#]_
- html
- css
* inline
- js: Rendered inline with **
Inline commands are usually sufficient for simple web pages. More advanced configurations are possible using a JSON :alt:`(yaml)` external configuration file.
.. code-block:: json
{
"selector": "head > script:nth-of-type(2), head > script:nth-of-type(3)",
"type": "js",
"saveAs": "js/modules2.js",
"process": ["minify"],
"metadata": { "custom-prop": true }
}
.. [#] MIME (mimeType) is required when bundling torrents.
.. [#] Use "~" for current path and filename.
.. [#] Multiple transformations per bundle can be chained using the "+" symbol.
.. [#] data-chrome-file='*"exportAs": "css/prod.css", "process": ["lint", "beautify"]*'
.. [#] Do not use the built-in transformers per document.
.. [#] boolean - config | "no-module" - inline
.. [#] Optionally installed NPM plugins are required. (e.g. imagemin-pngquant)
.. [#] png | jpeg | webp
.. [#] npm i node-zopfli
.. [#] "true" - explicit | "false"
.. [#] filename + content hash (productionRelease=true)
.. [#] Value can be limited to the starting prefix. (e.g. md5[8] - Minimum is 4)
.. [#] data-chrome-options='*"preserve": true, "hash": "md5", "compress": [{ "format": "gz" }], "encoding": "utf-16"*'
.. [#] Nested objects and arrays use strict JSON formatted attributes and strings.
.. [#] data-chrome-metadata='*"rollup-custom": { "import-maps": {} }, "terser-custom": { "config": {} }*'
.. [#v523] squared 5.2.3 (minimum)