component-preview
Preview component in browser in a single command line
Last updated 5 years ago by dawicorti .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install component-preview 
SYNC missed versions from official npm registry.

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);

Current Tags

  • 0.0.2                                ...           latest (5 years ago)

2 Versions

  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |