Skip to content

Releases: 11ty/webc

WebC v0.8.0

05 Dec 19:07
Compare
Choose a tag to compare
  • Breaking: attribute-name properties and attributes are now available in data as camel-case: attribute-name in JS data is attributeName. Read more at #71
  • Breaking: Removes page level API method for toggling reprocessing mode off (control more granularly with webc:raw or @raw instead). #72
  • Docs clarity and bug fixes to new webc:type="js" render function #78
    • Fix console.log inside webc:type="js" #80
    • Fix error with missing props in webc:type="js" #85
    • Fix error requiring string output from webc:type="js" #84
  • Bug fix when consuming dynamic attributes from a parent component #80
  • Bug fix for webc:imports in components that needed to be relative to the component file. #79

Full milestone: https://github.com/11ty/webc/milestone/12?closed=1
Full Changelog: v0.7.1...v0.8.0

WebC v0.7.1: `@raw`, `webc:if`, and `webc:type="js"`

17 Nov 22:46
Compare
Choose a tag to compare
  • @raw as an alias for webc:raw @html #70
  • webc:type="js" for simpler custom JavaScript (the successor to webc:type="render") #50 #73 #75
  • webc:if for conditional tags #76 #77

Milestone: https://github.com/11ty/webc/milestone/11?closed=1
Full Changelog: v0.7.0...v0.7.1

Docs are updated on https://www.11ty.dev/docs/languages/webc/ and https://github.com/11ty/webc

WebC v0.7.0: The Safety Maintenance Release

15 Nov 23:15
Compare
Choose a tag to compare

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: v0.6.2...v0.7.0

WebC v0.6.2: webc:import from npm

02 Nov 15:34
Compare
Choose a tag to compare

Import directly from npm

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">

Other Changes

WebC v0.6.1: Bug fixes

01 Nov 21:43
Compare
Choose a tag to compare

WebC v0.6.0: Import Aliases and `@text`

01 Nov 20:06
Compare
Choose a tag to compare
  • Adds npm: prefix to webc:import to import directly from node_modules (e.g. webc:import="npm:@11ty/eleventy-plugin-syntaxhighlighter/syntax-highlight.webc") #63
  • Option to add your own webc:import prefix alias to point to any folder (e.g. page.setAlias("key", "./my_custom_folder/");) #63
  • Adds @text prop for escaped content #51
  • Add support for <link rel="stylesheet" href="" webc:scoped> #53
  • Use any npm package in webc:type="render" functions by @RobinCsl in #59 #60
  • Access default slot as text in webc:type="render" functions #61
  • Fix for missing base64url encoding was on Stackblitz #56
  • Fix for extra <html><head><body> elements when using @html #57
  • Document page and component rendering modes #54 #64

WebC v0.5.4

17 Oct 22:15
Compare
Choose a tag to compare

WebC v0.5.3

14 Oct 23:42
Compare
Choose a tag to compare

WebC v0.5.2

14 Oct 22:06
Compare
Choose a tag to compare

Fixes a regression with @html (due to reprocessing #34), resulting in extra <!doctype html><html>… wrapped around return value from @html.

WebC v0.5.1

14 Oct 20:57
Compare
Choose a tag to compare

Quick fix edition! Two fixes:

  • Attempting to compile an empty string incorrectly threw an error. Empty string templates should compile as empty documents.
  • Adds reprocessingMode toggle to WebC class to support Eleventy Layout templates using @html without reprocessing all of the already-processed content.