@lukeboyle/react-component-boilerplate

A simple way to get started with making ES6 modules. Uses rollup to compile your ES6 to Commonjs and a basic Gulp process for a demo

Usage no npm install needed!

<script type="module">
  import lukeboyleReactComponentBoilerplate from 'https://cdn.skypack.dev/@lukeboyle/react-component-boilerplate';
</script>

README

React Component Boilerplate

This is a simple boilerplate project to get started with react components. The purpose of this is to make a component to easily publish on npm.

Installation

  • npm install @lukeboyle/react-component-boilerplate
  • Copy the files from node modules into your project root

Getting Started

Building your module

  • Develop your component in src/index.jsx
  • npm run build will run rollup on index.jsx under the src folder
  • Add your component to the demo project js
  • npm run build-demo will run the gulp default process in demo/src
  • The gulp process will use babelify to transform the jsx, so you may import your un-transpiled jsx file.