From 4bb467f93eb5b635766adf23e5d89c4678eeb312 Mon Sep 17 00:00:00 2001 From: Damir Date: Tue, 7 Mar 2023 15:44:55 +0100 Subject: [PATCH] Prepare for release RC1 Signed-off-by: Damir --- .gitignore | 3 +- changelog.md | 7 +++ readme.md | 158 ++++++++++++++++++++++++++++++++++----------------- 3 files changed, 114 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index 6e52888..f16eba2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ npm-debug.log /.idea/* .DS_Store .vscode -cache.json \ No newline at end of file +cache.json +/scripts/* \ No newline at end of file diff --git a/changelog.md b/changelog.md index 651bd05..04de010 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,10 @@ +## 1.0.0-RC.1 (2023-03-08) + +First Release Candidate + +* Prevent attributes used for passing props from being added to first node +* Updated docs + ## 1.0.0-beta.16 (2022-11-06) * Fix aware props propagation diff --git a/readme.md b/readme.md index 60eb6e4..10f7080 100644 --- a/readme.md +++ b/readme.md @@ -8,8 +8,6 @@

A PostHTML plugin for create components with HTML-friendly syntax inspired by Laravel Blade. Slots, stack/push, props, custom tag and much more.

-> This plugin is still in early stage of development and the current API may change. - ## Installation ```bash @@ -19,7 +17,7 @@ npm i -D posthtml-component ## Introduction This PostHTML plugin provides an HTML-friendly syntax for write components in your templates. -If you are familiar with Blade, you will find similar syntax as this plugin is inspired by it. +If you are familiar with Blade, React, Vue or similar, you will find familiar syntax as this plugin is inspired by them. See below a basic example, as code is worth a thousand words. **See also the first [PostHTML Bootstrap UI](https://github.com/thewebartisan7/posthtml-bootstrap-ui) using this plugin and check also the [starter template here](https://github.com/thewebartisan7/posthtml-bootstrap-ui-starter).** @@ -71,11 +69,11 @@ Result: ``` -You may notice that our `src/button.html` component has a `type` and `class` attribute, and when we use the component in `src/index.html` we add type and class attribute. -The result is that `type` is override, and `class` is merged. +You may notice that the `src/button.html` component has a `type` and `class` attribute, and when we use the component in `src/index.html` we pass `type` and `class` attribute. +The result is that `type` is override, and `class` is merged. -By default `class` and `style` attributes are merged, while all others attribute are override. -You can also override class and style attribute by prepending `override:` to the class attribute. Example: +By default `class` and `style` attributes are merged, while all others attribute are override. +You can also override `class` and `style` attributes by prepending `override:` to the class attribute. Example: ```html Submit @@ -84,43 +82,50 @@ You can also override class and style attribute by prepending `override:` to the ``` -All attributes you pass to the component will be added to the first node of your component or to the node with an attribute names `attributes`, -and only if they are not defined as `props` via `