clientjs-preview
v1.1.6
Published
extremely minimal ES6+ tester for client Javascript modules
Downloads
8
Maintainers
Readme
es-clientjs-tester
ABOUT
extremely minimal ES6+ tester for client Javascript modules
DESCRIPTION
This module has been made because I wanted to keep everything simple, develop frontend packages in js and publish them in npm without having to use any extra tools such as webpack, rolljs etc. to preview and test the work in browser.
HOW TO USE
As a standalone server
- Just select any js module that is supposed to be executed/used in the browser and put it inside static/modules/extras folder
- Put any CSS required in static/CSS
- Run the CORS server using
npm run serve
As a module
- Install it in your frontend project using
npm install es-clientjs-tester
- Import in your test/preview js file using
import ClientJsPreview from 'es-clientjs-tester
- Call the server using
ClientJsPreview(<main js path>)
- default port is 3000. If you want you may declare a different port in the serve argument 2