updated lib/index

- using html-to-js for transforming template to js module
- using path.extname to check filename for .html extension