Skip to content

Commit

Permalink
[add] VDOMNode class & Fragment function
Browse files Browse the repository at this point in the history
[migrate] replace Parcel with TSC for JSX R`untime bundling
[optimize] some Logic & Document details
  • Loading branch information
TechQuery committed Aug 2, 2023
1 parent a9d4843 commit c99a169
Show file tree
Hide file tree
Showing 13 changed files with 195 additions and 1,621 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
node_modules/
package-lock.json
yarn.lock
.parcel-cache/
dist/
/jsx-runtime.*
/dist/
jsx-runtime.d.ts
jsx-runtime.js
docs/
.vscode/settings.json
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.parcel-cache/
test/
docs/
.husky/
Expand Down
11 changes: 7 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ console.log(newVNode);

### TypeScript

[![Edit DOM Renderer example](https://codesandbox.io/static/img/play-codesandbox.svg)][6]

#### `tsconfig.json`

```json
Expand Down Expand Up @@ -67,16 +69,17 @@ console.log(newVNode);

### Inspiration

[![SnabbDOM](https://github.com/snabbdom.png)][6]
[![SnabbDOM](https://github.com/snabbdom.png)][7]

### Prototype

[![Edit DOM renderer](https://codesandbox.io/static/img/play-codesandbox.svg)][7]
[![Edit DOM Renderer](https://codesandbox.io/static/img/play-codesandbox.svg)][8]

[1]: https://www.webcomponents.org/
[2]: https://www.typescriptlang.org/
[3]: https://github.com/EasyWebApp/DOM-Renderer/actions/workflows/main.yml
[4]: https://gitpod.io/#https://github.com/EasyWebApp/DOM-Renderer
[5]: https://nodei.co/npm/dom-renderer/
[6]: https://github.com/snabbdom/snabbdom
[7]: https://codesandbox.io/s/dom-renderer-pglxkx?autoresize=1&expanddevtools=1&fontsize=14&hidenavigation=1&module=%2Fsrc%2Findex.ts&theme=dark
[6]: https://codesandbox.io/s/dom-renderer-example-pmcsvs?autoresize=1&expanddevtools=1&fontsize=14&hidenavigation=1&module=%2Fsrc%2Findex.tsx&theme=dark
[7]: https://github.com/snabbdom/snabbdom
[8]: https://codesandbox.io/s/dom-renderer-pglxkx?autoresize=1&expanddevtools=1&fontsize=14&hidenavigation=1&module=%2Fsrc%2Findex.ts&theme=dark
20 changes: 4 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dom-renderer",
"version": "2.0.0-beta.6",
"version": "2.0.0-rc.3",
"license": "LGPL-3.0-or-later",
"author": "shiy2008@gmail.com",
"description": "A light-weight DOM Renderer supports Web components standard & TypeScript language",
Expand All @@ -20,26 +20,21 @@
"bugs": {
"url": "https://github.com/EasyWebApp/DOM-Renderer/issues"
},
"source": "source/index.ts",
"source": "source/dist/index.ts",
"types": "dist/index.d.ts",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"dependencies": {
"@swc/helpers": "~0.4.14",
"tslib": "^2.6.1",
"web-utility": "^4.1.0"
},
"devDependencies": {
"@parcel/packager-ts": "~2.8.3",
"@parcel/transformer-typescript-types": "~2.8.3",
"@types/jest": "^29.5.3",
"@types/node": "^18.17.1",
"husky": "^8.0.3",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"lint-staged": "^13.2.3",
"open-cli": "^7.2.0",
"parcel": "~2.8.3",
"prettier": "^3.0.0",
"ts-jest": "^29.1.1",
"typedoc": "^0.24.8",
Expand All @@ -60,18 +55,11 @@
"testEnvironment": "jsdom"
},
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
"targets": {
"types": false,
"main": {
"optimize": true
}
},
"scripts": {
"prepare": "husky install",
"test": "lint-staged && jest",
"pack-jsx": "tsc -p tsconfig.json && mv dist/jsx-runtime.* . && rm dist/*.js",
"parcel": "npm run pack-jsx && parcel build",
"build": "rm -rf dist/ docs/ && typedoc source/ && npm run parcel",
"parcel": "tsc -p tsconfig.json && mv dist/jsx-runtime.* . && mv dist/dist/* dist/ && rm -rf dist/dist",
"build": "rm -rf dist/ docs/ && typedoc source/dist/ && npm run parcel",
"start": "typedoc source/ && open-cli docs/index.html",
"prepublishOnly": "npm test && npm run build"
}
Expand Down
Loading

0 comments on commit c99a169

Please sign in to comment.