aykutyaman / react-npm-babel-webpack-boilerplate

Setting Up a React.js Environment Using Npm, Babel 6 and Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

react-npm-babel-webpack-boilerplate

Installation

$ git clone git@github.com:aykutyaman/react-npm-babel-webpack-boilerplate.git
$ cd react-npm-babel-webpack-boilerplate
$ npm install

For development

Run webpack in watch mode with the webpack.config.dev.js config file

$ npm run dev

Now edit index.jsx file:

import React from 'react';

const Hello = React.createClass({
  render: function() {
    return (<div>Hello World!</div>)
  }
});

export default Hello;

After that open Open http://localhost:8080/webpack-dev-server/bundle in your browser to see the result.

For npm deploy with travis.ci

add these to .travis.ci file

deploy:
  provider: npm
  on:
    branch: master

After that, execute travis cli command, which encrypt your api_key and add it to the .travis.ci file.

$ travis encrypt YOUR_API_KEY --add deploy.api_key

Your api_key will be in the form of //registry.npmjs.org/:_authToken=API_KEY under the ~/.npmrc file if you use npm login command

About

Setting Up a React.js Environment Using Npm, Babel 6 and Webpack

License:MIT License


Languages

Language:JavaScript 100.0%