[go: nahoru, domu]

Skip to content
forked from olahol/reactpack

📦 build your react apps with one command and one `npm i`.

Notifications You must be signed in to change notification settings

JinCode/reactpack

 
 

Repository files navigation

reactpack js-standard-style

one command to build your React frontend.

reactpack

  • Unified package, only one npm i needed.
  • Linting with standard.
  • ES6 with Babel presets react, es2015 and stage-0.
  • PostCSS with precss and autoprefixer.
  • Style extraction into css bundle.
  • Automatic index.html creation with html-webpack-plugin.
  • Source maps for styles and scripts.
  • Watch mode (--watch).
  • Development server mode (--dev).
  • Toggle optimizations with uglify and cssnano (-O).

Install

$ npm i reactpack --save-dev

Example

import React, { Component } from 'react'
import { render } from 'react-dom'

require('bootstrap/dist/css/bootstrap.css')

class Example extends Component {
  render () {
    return <h1>Hello World!</h1>
  }
}

render(<Example />, document.getElementById('react-app'))
{
  ...
  dependencies: {
    ...
    "bootstrap": "^3.3.6",
    "react": "^15.1.0",
    "react-dom": "^15.1.0",
    ...
  }
  devDependencies: {
    "reactpack": "^0.2.0"
  }
  ...
}

reactpack

CLI

  Usage: reactpack [options] <entry> [path/to/bundle]

  Options:

    -h, --help       output usage information
    -V, --version    output the version number
    -q, --quiet      no output
    -O, --optimize   optimize
    -w, --watch      watch
    -d, --dev        dev
    -p, --port       port for webpack-dev-server
    --clean          clean everything in bundle path before building
    --no-source-map  output source map
    --no-postcss     do not use postcss
    --no-html        do not output an index.html
    --no-lint        turn off linting

About

📦 build your react apps with one command and one `npm i`.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.2%
  • HTML 3.8%