1.0.1 • Published 5 years ago

@sy97/html-log v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

html-log 🤙

Logging whatever you want and wherever you want straight on to the page

Getting Started

These instructions will get you started and running on your local machine for development

Prerequisites

Make sure you have a modern frontend dev enviroment setup or you wont be able to use the package with require or import. But you can still get it from node_modules using the following path:

./node_modules/@sy97/html-log/index

Installing

npm i -D @sy97/html-log
yarn add -D @sy97/html-log

Usage Example

html

<!-- any div for html-log to mount on -->
<div id="hlog"></div>

javascript

// import as whatever name you want
import hlog from '@sy97/html-log'

// initialize html-log by passing the div id
hlog.init('hlog')

// you can start using html-log anywhere in your project just like console.log()
function test (x) {
 hlog.log(x)
}

test('working!')

// check out the right corner of the page where you put your mounting div,
// it should be correctly displaying what you have logged

Contributing

Any kind of contribution is welcomed, thank you.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Author

Shien Yuan

License

This project is licensed under the MIT License.