0.1.4 • Published 2 years ago
entertain v0.1.4
Entertain
Web component visual testing tool. Powered by parcel and pug.
Setup
- Install
npm i -D entertain
- Create a test template, e.g.
/test/index.pug
- Add script
"test": "entertain test/index.pug"
in yourpackage.json
file - Run the script and open the local server URL to view.
The test template should look like this:
extends ../node_modules/entertain/explorer/base
block title
| Application Name
block head
link(rel='stylesheet' href='../node_modules/entertain/explorer/styles.css')
script(type='module' src='../src/index.js')
block nav
ul
+li('first')
ul
+li('first/test1')
+li('first/test2')
+li('_', 'Back to top')
block page
//- include examples here
Testing
This package can be tested locally by running npm test
at the folder root and it will run a local server using the /test/index.pug
template.