component-preview
v0.0.2
Published
Preview component in browser in a single command line
Downloads
2
Readme
component-preview
Preview a component in browser in a single command line
Usage
Usage: component-preview [options] <script>
Options:
-h, --help output usage information
-V, --version output the version number
-d, --directory <path> Component directory (default = '.')
-p, --port <n> Port to listen to (default = 3000)
The script argument is a javascript file. It contains the needed code to execute your component. For instance:
// Require your component with its name
var MyComponent = require('my-component');
console.log('I am executed on DOM.load event');
// Play with your component
var mycpn = new MyComponent();
document.body.appendChild(mycpn.el);