@factor/app
Advanced tools
Comparing version 1.0.0-alpha.27 to 1.0.0-alpha.28
@@ -34,10 +34,24 @@ import Factor from "vue" | ||
// This uses a callback because the component's 'created' hooks are called after this point | ||
ssrContext.factor_head = () => { | ||
return Factor.$filters.apply("factor_head", []).join("") | ||
} | ||
ssrContext.factor_html_attr = () => ['lang="en"', `class="factor-${ui}"`].join(" ") | ||
const metaHooks = ["factor_head", "factor_body_start", "factor_body_end"] | ||
ssrContext.factor_body_class = (additional = "") => `class="${additional}"` | ||
metaHooks.forEach(h => { | ||
ssrContext[h] = () => { | ||
return Factor.$filters.apply(h, []).join("") | ||
} | ||
}) | ||
const attrHooks = [ | ||
{ name: "factor_html_attr", attr: ['lang="en"'], classes: [`factor-${ui}`] }, | ||
{ name: "factor_body_attr", attr: [], classes: [] } | ||
] | ||
attrHooks.forEach(({ name, attr, classes }) => { | ||
ssrContext[name] = additional => { | ||
classes.push(additional) | ||
attr.push(`class="${classes.join(" ")}"`) | ||
return Factor.$filters.apply(name, attr).join(" ") | ||
} | ||
}) | ||
ssrContext.state = store.state | ||
@@ -44,0 +58,0 @@ |
{ | ||
"name": "@factor/app", | ||
"version": "1.0.0-alpha.27", | ||
"version": "1.0.0-alpha.28", | ||
"main": "index.js", | ||
@@ -16,4 +16,4 @@ "license": "GPL-2.0", | ||
"dependencies": { | ||
"@factor/app-extend": "^1.0.0-alpha.27", | ||
"@factor/app-fallbacks": "^1.0.0-alpha.27", | ||
"@factor/app-extend": "^1.0.0-alpha.28", | ||
"@factor/app-fallbacks": "^1.0.0-alpha.28", | ||
"@factor/app-router": "^1.0.0-alpha.27", | ||
@@ -25,3 +25,3 @@ "@factor/app-settings": "^1.0.0-alpha.27", | ||
}, | ||
"gitHead": "de4c9abae202be38490a1bf04f1da5985aad7f54" | ||
"gitHead": "5e159c817b9e34ff4abd033723d247a88eccdcd7" | ||
} |
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
27070
220