Bot releases are hidden (Show)
Published by zachleat over 1 year ago
webc:nobundle
feature to opt-out nodes (and children) from bundling.webc:nobundle
is implied on Declarative Shadow DOM templates.webc:for
from @sombriks in #161Milestone: https://github.com/11ty/webc/milestone/21?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.11.2...v0.11.3
Published by zachleat over 1 year ago
webc:setup
scripts #152 #154Milestone: https://github.com/11ty/webc/milestone/20?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.11.1...v0.11.2
Published by zachleat over 1 year ago
Regression quick fix:
$data
, fixes #152Full Changelog: https://github.com/11ty/webc/compare/v0.11.0...v0.11.1
Milestone: https://github.com/11ty/webc/milestone/19?closed=1
Published by zachleat over 1 year ago
Milestone: https://github.com/11ty/webc/milestone/18?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.10.1...v0.11.0
⚠️ BREAKING ⚠️ This will affect your component code if you relied on global data from inside of component definitions.
Child components will now need to access global data through a top level $data
variable instead of as top level variables. This is important to prevent global data leaking into component data and affecting component logic.
This will not affect pages or top-level WebC components (in Eleventy world, these are *.webc
files as Eleventy layouts or in as pages in your input folder). This only affects child components (in Eleventy world, this means files in your components folder, e.g. _components/**/*.webc
).
Sorry to have to make this breaking change, but it’s an important one.
Other fixes in this release:
webc:scoped
with @keyframes
and percentages. #145webc:setup
feeding Arrays into webc:for
#150Published by zachleat over 1 year ago
webc.escapeText
functionwebc.escapeAttribute
functionwebc.filterPublicAttributes
functionDocs for the above: https://www.11ty.dev/docs/languages/webc/#extra-data-for-javascript-render-functions
Milestone: https://github.com/11ty/webc/milestone/17?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.10.0...v0.10.1
Published by zachleat over 1 year ago
webc:for
for looping https://www.11ty.dev/docs/languages/webc/#webcfor-loops #28webc:elseif
and webc:else
https://www.11ty.dev/docs/languages/webc/#webcelseif-and-webcelse #136<!--- One more dash at the start and end --->
https://www.11ty.dev/docs/languages/webc/#server-only-comments #126<script webc:type="js">
(via `webc:is="template") will be treated as HTML-only components and not use the host component tags. #135img.webc
returning an <img>
without needing using webc:root="override"
). #138img.webc
returning an <img>
without needing using webc:root="override"
) #107.koa
WebC integration example added by @sombriks in https://github.com/11ty/webc/pull/134
Milestone: https://github.com/11ty/webc/issues?q=is%3Aclosed+milestone%3A%22WebC+v0.10.0%22
Full Changelog: https://github.com/11ty/webc/compare/v0.9.3...v0.10.0
Published by zachleat over 1 year ago
vm.createContext
A special thanks to @marvinhagemeister’s Node profiling recommendation!
From a large sample WebC project:
Before, using WebC v0.9.2:
> Wrote 2621 files in 21.17 seconds (8.1ms each, v2.0.0)
After, using WebC v0.9.3:
> Wrote 2621 files in 7.24 seconds (2.8ms each, v2.0.0)
From 8.1ms per template to 2.8ms per template!
Full Changelog: https://github.com/11ty/webc/compare/v0.9.2...v0.9.3
Published by zachleat over 1 year ago
webc:bucket
hoisting (adding to a non-default
bucket and then the default
bucket should remove code from the non-default
bucket)Full Changelog: https://github.com/11ty/webc/compare/v0.9.1...v0.9.2
Published by zachleat over 1 year ago
webc:bucket
on any tag and it will cascade to all child content (with automatic hoisting when necessary) #122webc:bucket
to be dynamic (e.g. :webc:bucket="myJavaScriptData"
) #120WebC.getComponentsMap()
#123npm:
aliasing support to WebC.getComponentsMap()
#123Full Changelog: https://github.com/11ty/webc/compare/v0.9.0...v0.9.1
Milestone: https://github.com/11ty/webc/milestone/14?closed=1
Published by zachleat over 1 year ago
webc:root="override"
instead of webc:root webc:keep
to override the host component tag #112webc:raw
is no longer implied on <template>
and <noscript>
#105webc:type="js"
now has an implied webc:is="template" webc:nokeep
to render child content as WebC HTML by default (override with your own webc:is
and/or webc:keep
). Related Docs #91getComponentList
method to simplify code base, no longer needed for incremental WebC builds in Eleventy #113<script webc:setup>
feature to use arbitrary JavaScript to export data for use in the component #109shadowrootmode
attribute to opt-out of asset bundling in Declarative Shadow DOM #108@attributes
feature to render an attributes object #114
:@
prefix for dynamic properties (e.g. :@dynamic-property
) #94 #98webc:ignore
will completely ignore a node (no processing or output) #110webc:scoped
by @Gyanreyer in https://github.com/11ty/webc/pull/96
global
support in webc:type="js"
#116, #99, #100webc:type="js"
and webc:type="render"
)Full Milestone: https://github.com/11ty/webc/milestone/13?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.8.0...v0.9.0
Published by zachleat almost 2 years ago
attribute-name
properties and attributes are now available in data as camel-case: attribute-name
in JS data is attributeName
. Read more at #71webc:raw
or @raw
instead). #72webc:type="js"
render function #78
console.log
inside webc:type="js"
#80webc:type="js"
#85webc:type="js"
#84webc:import
s in components that needed to be relative to the component file. #79Full milestone: https://github.com/11ty/webc/milestone/12?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.7.1...v0.8.0
Published by zachleat almost 2 years ago
@raw
as an alias for webc:raw @html
#70webc:type="js"
for simpler custom JavaScript (the successor to webc:type="render"
) #50 #73 #75webc:if
for conditional tags #76 #77Milestone: https://github.com/11ty/webc/milestone/11?closed=1
Full Changelog: https://github.com/11ty/webc/compare/v0.7.0...v0.7.1
Docs are updated on https://www.11ty.dev/docs/languages/webc/ and https://github.com/11ty/webc
Published by zachleat almost 2 years ago
Changes to facilitate fixes in @11ty/eleventy-plugin-webc
, specifically:
This release has no breaking changes in WebC, but will have breaking changes in @11ty/eleventy-plugin-webc
and we want to keep version parity between the two.
Full Changelog: https://github.com/11ty/webc/compare/v0.6.2...v0.7.0
Published by zachleat almost 2 years ago
This example uses @11ty/[email protected]
.
<syntax-highlight language="js" webc:import="npm:@11ty/eleventy-plugin-syntaxhighlight">
function myFunction() {
return true;
}
</syntax-highlight>
Uses the component tag name (syntax-highlight
) to look for a WebC component at node_modules/@11ty/eleventy-plugin-syntaxhighlight/syntax-highlight.webc
and imports it for use.
This works with webc:is
too:
<template webc:is="syntax-highlight" language="js" webc:import="npm:@11ty/eleventy-plugin-syntaxhighlight">
webc:import
docs and Syntax Highlighter plugin docs) have been updated.Published by zachleat almost 2 years ago
node_modules
folder directly.Published by zachleat almost 2 years ago
npm:
prefix to webc:import
to import directly from node_modules
(e.g. webc:import="npm:@11ty/eleventy-plugin-syntaxhighlighter/syntax-highlight.webc"
) #63webc:import
prefix alias to point to any folder (e.g. page.setAlias("key", "./my_custom_folder/");
) #63@text
prop for escaped content #51<link rel="stylesheet" href="" webc:scoped>
#53webc:type="render"
functions by @RobinCsl in #59 #60webc:type="render"
functions #61base64url
encoding was on Stackblitz #56<html><head><body>
elements when using @html
#57page
and component
rendering modes #54 #64Published by zachleat almost 2 years ago
<template webc:type>
) and raw passthrough for <template webc:raw>
. #48class
in JS code #45Published by zachleat about 2 years ago
#44 Reverts strict property usage from #18.
Milestone: https://github.com/11ty/webc/issues?q=is%3Aclosed+milestone%3A0.5.3
Published by zachleat about 2 years ago
Fixes a regression with @html
(due to reprocessing #34), resulting in extra <!doctype html><html>…
wrapped around return value from @html
.
Published by zachleat about 2 years ago
Quick fix edition! Two fixes:
reprocessingMode
toggle to WebC class to support Eleventy Layout templates using @html
without reprocessing all of the already-processed content.