rs-kit
Develop Tools for React component
Last updated 3 years ago by yanweiqing .
MIT · Original npm · Tarball · package.json
$ cnpm install rs-kit 
SYNC missed versions from official npm registry.

ReadME

Develop tool for React Component Development

Remember to follow File Structure Guide of react-salt-component below

Feature

  • support jsx
  • support es6

File Structure Guide

-assets/ // less files
-examples/
-src/ //put your component here
-readme.md
-package.json

Start Server

npm install rs-server

node node_modules/.bin/rs-server // default port 7777

Publish

node node_modules/.bin/pre-publish // Compile files

npm publish

examples/simple.jsx

import React from 'react';

export default class Example extends React.Component {
    constructor(props) {
        super(props);
        this.onClick = this.onClick.bind('this');
    }
    onClick() {
        alert('This is a simple example');
    }
    render() {
        return <button onClick={this.onClick}>This is a simple Example</button>;
    }
};

You can add these in your package.json:

"scripts" : {
    "dev": "node node_modules/.bin/cat-server",
	"build": "node node_modules/.bin/build",
    "pre-publish": "node node_modules/.bin/pre-publish"
}

Then,you can run instead

npm run dev
npm run build
组件注释请写在src文件夹下的组件内

Current Tags

  • 0.0.2                                ...           latest (3 years ago)

2 Versions

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

Copyright 2014 - 2016 © taobao.org |