0.4.5 • Published 8 years ago

rt-core v0.4.5

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

RT-CORE

NPM Version NPM Downloads

The core functionalities for Rabbit Tools.

如何使用

  • 安装相关npm依赖
npm install --save-dev babel-plugin-react-transform
npm install --save-dev react-transform-catch-errors
npm install --save-dev react-transform-hmr
npm install --save-dev redbox-react
  • 在项目根目录创建.rtrc文件 (HMR功能需要)

  • 使用rt-core 提供的两个功能:开发服务、HTML构建

  • 开发服务(HMR功能)

require('babel-polyfill')

const rtCore = require('rt-core')

rtCore.server({
  dir: 'examples/examples',
  host: 'http://localhost',
  port: 8012,
})
  • HTML构建
require('babel/polyfill')

const rtCore = require('rt-core');

rtCore.build({
  dir: 'examples/examples',
  builddir: 'examples/build',
})

请参考examples