Skip to content

Commit

Permalink
chore: version up 1.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
superlucky84 committed Nov 1, 2024
1 parent 21384f7 commit ea485f8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 63 deletions.
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Lithent were developed to make it easy to insert Virtual DOM component
fragments into pages already drawn with SSR, and are intended to be
used lightly in a variety of situations.

`(lithent.mjs 14.11 kB │ gzip: 4.46 kB │ map: 59.97 kB)`
`(lithent.umd.js 10.30 kB │ gzip: 4.04 kB │ map: 58.39 kB)`
`(lithent.mjs 14.62 kB │ gzip: 4.62 kB │ map: 61.56 kB)`
`(lithent.umd.js 10.66 kB │ gzip: 4.14 kB │ map: 59.94 kB)`

## 🚩 Table of Contents
- [Thanks for the introduction](#thanks-for-the-introduction)
Expand Down Expand Up @@ -78,14 +78,14 @@ pnpm add lithent

#### Or Use CDN

* UMD : https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.umd.js
* UMD-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.umd.js
* UMD-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.umd.js
* UMD-TAG: https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.umd.js
* ESM : https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.mjs
* ESM-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.mjs
* ESM-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.mjs
* ESM-TAG: https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.mjs
* UMD : https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.umd.js
* UMD-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.umd.js
* UMD-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.umd.js
* UMD-TAG: https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.umd.js
* ESM : https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.mjs
* ESM-HELPER: https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.mjs
* ESM-FTAGS: https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.mjs
* ESM-TAG: https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.mjs


It's easier to use lithent with JSX or HTM.
Expand All @@ -110,9 +110,9 @@ import { fTags, fFragment, fMount } from 'lithent/ftags';
const { section, div, p, br, strong } = fTags;

/* UMD
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.umd.js"></script>
const { render } = lithent;
const { fTags, fMount, fFragment } = lithentFTags;
Expand All @@ -124,14 +124,15 @@ const fTagComponent = fMount<{ firstProp: number }>((_r, props, children) => {
fFragment(
'first inner',
div({ style: { border: '1px solid red' } }, 'second inner'),
div('The props argument can be omitted.'),
props.firstProp,
...children
);
});

render(
fTagComponent(
{ firstProp: 3 },
{ firstProp: 3 }, // The props argument can be omitted.
div({ style: { border: '1px solid green' } }, `Fchildren1`),
'Fchildren2',
br()
Expand Down Expand Up @@ -184,10 +185,10 @@ const destroy = render(lTag`<${Component} />`, document.getElementById('root'),
#### With UMD

```html
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.umd.js"></script-->

<div id="root"></div>

Expand Down Expand Up @@ -256,8 +257,11 @@ pnpm dev // or pnpm dev:core

## Test

> To fully test everything, including plugins like helper and ftags, a build is required.
```bash
// pnpm install
pnpm install
pnpm build
pnpm test
```

62 changes: 19 additions & 43 deletions lithentDocs/src/pages/install.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { ContentHeader } from '@/components/contentHeader';
import hljs from 'highlight.js';
import 'highlight.js/styles/hybrid.css';

const code10 = `<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.umd.js"></script>
const code10 = `<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.umd.js"></script>
<div id="root"></div>
Expand All @@ -21,14 +21,15 @@ const fTagComponent = fMount<{ firstProp: number }>((_r, props, children) => {
fFragment(
'first inner',
div({ style: { border: '1px solid red' } }, 'second inner'),
div('The props argument can be omitted.'),
props.firstProp,
...children
);
});
render(
fTagComponent(
{ firstProp: 3 },
{ firstProp: 3 }, // The props argument can be omitted.
div({ style: { border: '1px solid green' } }, \`Fchildren1\`),
'Fchildren2',
br()
Expand All @@ -39,10 +40,10 @@ render(
</script>
`;

const code7 = `<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.umd.js"></script-->
const code7 = `<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.umd.js"></script-->
<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.umd.js"></script>
<!--script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.umd.js"></script-->
<div id="root"></div>
Expand Down Expand Up @@ -97,7 +98,7 @@ const Component = mount((r, _props) => {
const destroy = render(lTag\`<\${Component} />\`, document.getElementById('root'));
`;

const code9 = `<script src="https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.umd.js"></script>;
const code9 = `<script src="https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.umd.js"></script>;
const { lTag } = lithentTag;
const destroy = render(lTag\`<\${Component} />\`, document.getElementById('root'));
`;
Expand Down Expand Up @@ -131,17 +132,6 @@ const code3 = `...
...
`;

const code4 = `...
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "lithent",
//...
}
}
...
`;

const code5 = `...
// typescript config
{
Expand Down Expand Up @@ -178,10 +168,6 @@ const exCode3 = hljs.highlight(code3, {
language: 'javascript',
}).value;

const exCode4 = hljs.highlight(code4, {
language: 'javascript',
}).value;

const exCode5 = hljs.highlight(code5, {
language: 'javascript',
}).value;
Expand Down Expand Up @@ -260,27 +246,27 @@ export const Install = mount(() => {
<div class="px-2 py-2 overflow-x-auto text-sm text-gray-50 border border-gray-200 border-dashed rounded border-gray-600 bg-black">
<p> </p>
<p>## umd</p>
<p>https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.umd.js</p>
<p>https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.umd.js</p>
<p>
https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.umd.js
https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.umd.js
</p>
<p>
https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.umd.js
https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.umd.js
</p>
<p>
https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.umd.js
https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.umd.js
</p>
<p>&nbsp;</p>
<p>## esm</p>
<p>https://cdn.jsdelivr.net/npm/lithent@1.13.1/dist/lithent.mjs</p>
<p>https://cdn.jsdelivr.net/npm/lithent@1.14.0/dist/lithent.mjs</p>
<p>
https://cdn.jsdelivr.net/npm/lithent@1.13.1/helper/dist/lithentHelper.mjs
https://cdn.jsdelivr.net/npm/lithent@1.14.0/helper/dist/lithentHelper.mjs
</p>
<p>
https://cdn.jsdelivr.net/npm/lithent@1.13.1/ftags/dist/lithentFTags.mjs
https://cdn.jsdelivr.net/npm/lithent@1.14.0/ftags/dist/lithentFTags.mjs
</p>
<p>
https://cdn.jsdelivr.net/npm/lithent@1.13.1/tag/dist/lithentTag.mjs
https://cdn.jsdelivr.net/npm/lithent@1.14.0/tag/dist/lithentTag.mjs
</p>
</div>
<div class="py-2 mb-4 overflow-x-auto text-sm text-gray-50 ">
Expand Down Expand Up @@ -320,7 +306,7 @@ export const Install = mount(() => {
/>
</div>
<h3 class="text-slate-50 text-lg mb-2 mt-8">
Setting JSX - Typescript &lt; 4.1.1
Setting JSX - Typescript (jsx-runtime is not supported yet.)
</h3>
<div class="px-2 py-2 overflow-x-auto text-sm text-gray-50 border border-gray-200 border-dashed rounded border-gray-600 bg-black">
<div
Expand All @@ -329,16 +315,6 @@ export const Install = mount(() => {
style={{ whiteSpace: 'pre' }}
/>
</div>
<h3 class="text-slate-50 text-lg mb-2 mt-8">
Setting JSX - Typescript &gt;= 4.1.1
</h3>
<div class="px-2 py-2 overflow-x-auto text-sm text-gray-50 border border-gray-200 border-dashed rounded border-gray-600 bg-black">
<div
class="font-normal"
innerHTML={exCode4}
style={{ whiteSpace: 'pre' }}
/>
</div>
<h3 class="text-slate-50 text-lg mb-2 mt-8">
Setting JSX - If you use TypeScript within a Babel toolchain
</h3>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "lithent",
"version": "1.13.1",
"version": "1.14.0",
"description": "An extensible virtual DOM library for lightweight use in a variety of environments.",
"packageManager": "pnpm@7.6.0",
"main": "./dist/lithent.umd.js",
Expand Down

0 comments on commit ea485f8

Please sign in to comment.