@vxna/mini-html-webpack-template
Advanced tools
Comparing version 0.0.5 to 0.0.6
10
index.js
@@ -15,3 +15,3 @@ const { | ||
function template(ctx) { | ||
const { css, js, lang, title, head, body, container, minify } = ctx | ||
let { css, js, lang, title, head = [], body = [], container, minify } = ctx | ||
@@ -55,15 +55,15 @@ const doc = html` | ||
function generateMetaTags(items) { | ||
function generateMetaTags(items = []) { | ||
return items.map(item => `<meta ${wrap(item)}>`) | ||
} | ||
function generateLinkTags(items) { | ||
function generateLinkTags(items = []) { | ||
return items.map(item => `<link ${wrap(item)}>`) | ||
} | ||
function generateScriptTags(items) { | ||
function generateScriptTags(items = []) { | ||
return items.map(item => `<script ${wrap(item)}></script>`) | ||
} | ||
function generateRawTags(items) { | ||
function generateRawTags(items = [] || '') { | ||
if (typeof items === 'string' || items instanceof String) { | ||
@@ -70,0 +70,0 @@ return items |
{ | ||
"name": "@vxna/mini-html-webpack-template", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Minimum viable template for mini-html-webpack-plugin", | ||
@@ -5,0 +5,0 @@ "author": "@vxna", |
@@ -82,9 +82,9 @@ # @vxna/mini-html-webpack-template | ||
| Name | Type | Default | Description | | ||
| :----------------: | :--------------: | :---------: | :-------------------------------------- | | ||
| **`head.meta`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`head.links`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`head.scripts`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| Name | Type | Default | Description | | ||
| :----------------: | :---------------: | :---------: | :-------------------------------------- | | ||
| **`head.meta`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`head.links`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`head.scripts`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`head.raw`** | `{Array\|String}` | `undefined` | Raw document markup | | ||
| **`body.scripts`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`body.scripts`** | `{Array}` | `undefined` | Array of objects with key + value pairs | | ||
| **`body.raw`** | `{Array\|String}` | `undefined` | Raw document markup | | ||
@@ -91,0 +91,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7503