Skip to content

Commit

Permalink
Split out template engine into “x-template.js”.
Browse files Browse the repository at this point in the history
Conceptually “XElement” and “XTemplate” do very different things. The
former is all about defining _element interfaces_ and the latter is all
about turning interpolated markup into dom.

Over time, even our PR diffs have highlited this separation of concerns.
Often a PR _either_ changes XElement _or_ XTemplate — rarely both.
  • Loading branch information
theengineear committed Dec 5, 2024
1 parent f739937 commit 2213dfc
Show file tree
Hide file tree
Showing 17 changed files with 1,443 additions and 1,309 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- You may now bind values of type `DocumentFragment` within the template engine.
In particular, this was added to enable advanced flows without needing to
bloat the default template engine interface (#207, #216).
- Pull “x-template.js” into a separate file. Conceptually it solves a totally
different problem than “x-element” (#226).

### Deprecated

Expand Down
17 changes: 11 additions & 6 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
"version": "1.1.1",
"exports": {
"./x-element.js": "./x-element.js",
"./x-element.d.ts": "./x-element.d.ts",
"./x-template.js": "./x-template.js",
"./etc/ready.js": "./etc/ready.js",
"./etc/ready.d.ts": "./etc/ready.d.ts"
"./ts/x-element.d.ts": "./ts/x-element.d.ts",
"./ts/x-template.d.ts": "./ts/x-template.d.ts",
"./ts/etc/ready.d.ts": "./ts/etc/ready.d.ts"
},
"include": [
"./x-element.js",
"./x-element.d.ts",
"./x-element.d.ts.map",
"./x-template.js",
"./etc/ready.js",
"./etc/ready.d.ts",
"./etc/ready.d.ts.map"
"./ts/x-element.d.ts",
"./ts/x-element.d.ts.map",
"./ts/x-template.d.ts",
"./ts/x-template.d.ts.map",
"./ts/etc/ready.d.ts",
"./ts/etc/ready.d.ts.map"
]
}
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default [
ignores: ['server.js', 'test.js'],
},
{
files: ['x-element.js', 'etc/ready.js'],
files: ['x-element.js', 'x-template.js', 'etc/ready.js'],
plugins: { jsdoc },
rules: {
'jsdoc/require-param-description': 'off',
Expand Down
1 change: 0 additions & 1 deletion etc/ready.d.ts.map

This file was deleted.

Loading

0 comments on commit 2213dfc

Please sign in to comment.