GithubHelp home page GithubHelp logo

patternfly-webcomponents / react-static-pf-webcomponents Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 351 KB

This project demonstrates how to use Patternfly web components in the React Static Boilerplate.

Home Page: https://react-static-pf-webcompo-8dd7f.firebaseapp.com

License: MIT License

JavaScript 94.87% CSS 3.76% HTML 1.37%
react webcomponents

react-static-pf-webcomponents's Introduction

Patternfly React Starter

A Patternfly + React starter kit based on React Static Boilerplate.

Demo: https://react-static-pf-webcompo-8dd7f.firebaseapp.com/  |  View docs  |  Follow us on Gitter, Twitter, and Slack  | 

Image of PatternFly Image of Loves Image of React

Features

    ✓ Includes Patternfly CSS & some React implementations of Patternfly components
    ✓ Modern JavaScript syntax (ES2015+) via Babel, modern CSS syntax via PostCSS
    ✓ Component-based UI architecture via React, Webpack and CSS Modules
    ✓ Application state management /w time-travel debugging via Redux (see main.js, core/store.js)
    ✓ Routing and navigation via path-to-regexp and history (see main.js, core/router.js, utils/routes-loader.js)
    ✓ Code-splitting and async chunk loading via Webpack and ES6 System.import()
    ✓ Hot Module Replacement (HMR) /w React Hot Loader
    ✓ Cross-device testing with Browsersync (see run.js#start)
    ✓ 24/7 community support on Gitter; customization requests on Codementor

Learn to React.js and ES6

Directory Layout

.
├── /components/                # Shared or generic UI components
│   ├── /CardView/              # CardView component
│   ├── /Layout/                # Website layout component
│   ├── /Link  /                # Link component to be used insted of <a>
│   └── /...                    # etc.
├── /core/                      # Core framework
│   ├── /history.js             # Handles client-side navigation
│   ├── /router.js              # Handles routing and data fetching
│   └── /store.js               # Application state manager (Redux)
├── /node_modules/              # 3rd-party libraries and utilities
├── /pages/                     # React components for web pages
│   ├── /app/                   # App page
│   ├── /error/                 # Error page
│   ├── /home/                  # Home page
│   └── /...                    # etc.
├── /public/                    # Static files such as favicon.ico etc.
│   ├── /dist/                  # The folder for compiled output
│   ├── favicon.ico             # Application icon to be displayed in bookmarks
│   ├── robots.txt              # Instructions for search engine crawlers
│   └── /...                    # etc.
├── /test/                      # Unit and integration tests
├── /utils/                     # Utility and helper classes
│── main.js                     # React application entry point
│── package.json                # The list of project dependencies and NPM scripts
│── routes.json                 # This list of application routes
│── run.js                      # Build automation script, e.g. `node run build`
└── webpack.config.js           # Bundling and optimization settings for Webpack

Getting Started

Step 1. Make sure that you have Node.js v6 or newer installed on your machine.

Step 2. Clone this repository or use Yeoman generator to bootstrap your project:

$ git clone -o upstream -b master --single-branch \
      https://github.com/priley86/patternfly-react-starter.git MyApp
$ cd MyApp
$ npm install                   # Install project dependencies listed in package.json

——— or ———

$ npm install -g yo
$ npm install -g generator-react-static
$ mkdir MyApp
$ cd MyApp
$ yo react-static

Step 3. Compile and launch your app by running:

$ node run                      # Same as `npm start` or `node run start`

You can also test your app in release (production) mode by running node run start --release or with HMR and React Hot Loader disabled by running node run start --no-hmr. The app should become available at http://localhost:3000/.

How to Test

The unit tests are powered by jest.

$ npm run lint                  # Check JavaScript and CSS code for potential issues
$ npm run test                  # Run unit tests. Or, `npm run test:watch` or `npm run test:cov`

How to Deploy

Update publish script in the run.js file with your full Firebase project name as found in your Firebase console. Note that this may have an additional identifier suffix than the shorter name you've provided. Then run:

$ node run publish              # Build and publish the website to Firebase, same as `npm run publish`

The first time you publish, you will be prompted to authenticate with Google and generate an authentication token in order for the publish script to continue.

publish

If you need just to build the project without publishing it, run:

$ node run build                # Or, `node run build --release` for production build

Learn React.js and ES6

🎓   React.js Training Program by Tyler McGinnis
🎓   React for Beginners and ES6 Training Course by Wes Bos
📗   React: Up & Running: Building Web Applications by Stoyan Stefanov (Aug, 2016)
📗   Getting Started with React by Doel Sengupta and Manu Singhal (Apr, 2016)
📗   You Don't Know JS: ES6 & Beyond by Kyle Simpson (Dec, 2015)

Related Projects

  • React App SDK — Create React apps with just a single dev dependency and zero configuration
  • React Starter Kit — Isomorphic web app boilerplate (Node.js, React, GraphQL, Webpack, CSS Modules)
  • ASP.NET Core Starter Kit — Cross-platform single-page application boilerplate (ASP.NET Core, React, Redux)
  • Babel Starter Kit — JavaScript library boilerplate (ES2015, Babel, Rollup, Mocha, Chai, Sinon, Rewire)
  • Universal Router — Isomorphic router for web and single-page applications (SPA)
  • History — HTML5 History API wrapper library that handle navigation in single-page apps

License

This source code is licensed under the MIT license found in the LICENSE.txt file.


Made with ♥ by the Patternfly team

react-static-pf-webcomponents's People

Contributors

koistya avatar b2whats avatar priley86 avatar frenzzy avatar adityachugh avatar alerosa avatar cobbweb avatar bdefore avatar creeperyang avatar dax70 avatar handtrix avatar lacour avatar jdelafon avatar liesislukas avatar pedrinholula avatar i8ramin avatar theomer avatar james4388 avatar xdamman avatar jacobhamblin avatar vitr avatar

Stargazers

chakra j avatar Santiago Angel avatar puiu avatar

Watchers

James Cloos avatar  avatar Jeff Phillips avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.