Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dna-engine/node-jsdom-starter
Sample dna-engine application running on node with jsdom
https://github.com/dna-engine/node-jsdom-starter
example javascript jsdom nodejs npm starter
Last synced: about 1 month ago
JSON representation
Sample dna-engine application running on node with jsdom
- Host: GitHub
- URL: https://github.com/dna-engine/node-jsdom-starter
- Owner: dna-engine
- License: mit
- Created: 2017-03-02T07:50:55.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T16:17:38.000Z (4 months ago)
- Last Synced: 2024-08-14T17:57:30.244Z (4 months ago)
- Topics: example, javascript, jsdom, nodejs, npm, starter
- Language: JavaScript
- Homepage: https://dna-engine.org/docs/#setup-npm
- Size: 873 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# node-jsdom-starter
_Sample dna-engine application running on node with jsdom_
[![License:MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://dna-engine.org/license)
[![Build](https://github.com/dna-engine/node-jsdom-starter/actions/workflows/run-spec-on-push.yaml/badge.svg)](https://github.com/dna-engine/node-jsdom-starter/actions/workflows/run-spec-on-push.yaml)[dna-engine.org](https://dna-engine.org), a UI templating library, can be run headless (no browser) on
Node.js with the DOM provided by jsdom.### Setup
Enter the terminal commands:
```shell
$ cd node-jsdom-starter
$ npm install
$ node app
```### Import and Initialize
```javascript
// Imports
import { JSDOM } from 'jsdom';
import { dna } from 'dna-engine';// Setup
const html = `
Tasks
~~title~~
`;
const dom = new JSDOM(html);
dna.initGlobal(dom.window);
```### Output
![require dna-engine](screenshots/terminal.png)---
[MIT License](LICENSE.txt)