diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..f49c9be --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [24] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - run: npm ci + - run: npm run build --if-present + - run: npm run coverage --if-present + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2d8d77e..9770d11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -.nyc_output/ +.DS_Store +.nyc_output +v8.log coverage/ +dist/ node_modules/ -package-lock.json diff --git a/.npmignore b/.npmignore deleted file mode 100644 index aaebbf0..0000000 --- a/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -.nyc_output/ -coverage/ -node_modules/ -rollup/ -test/ -package-lock.json -uhtml-head.jpg -LOGO.txt -.travis.yml -DOCUMENTATION.md -V0.md diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..cafe685 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d5d5eb4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - stable -git: - depth: 1 -branches: - only: - - main -after_success: - - "npm run coveralls" diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md deleted file mode 100644 index e547b63..0000000 --- a/DOCUMENTATION.md +++ /dev/null @@ -1,476 +0,0 @@ -# What Is µhtml (micro html) And How Does It Work - - - -A _getting started_ guide with most common questions and answers, covered by live examples. - -- - - - - -### A Brief Introduction - -While _µhtml_, on the surface, is a library that resemble some naive usage of [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML), it's actually far away from being an `innerHTML` replacement, as it's capable of handling events listeners, special and normal attributes, plus various kind of content, that will be properly parsed, normalized, and repeatedly updated at light speed, without trashing the previous content like `innerHTML` would do per each operation. - -```js -render(element, html` -