petervo / welder-web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welder Web

Build Status

The web interface for Welder!

Getting Started

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

nvm install 6.9.1

Or if it's installed, make sure you're using it:

nvm use 6.9.1

Step 2. Clone this repository and install its dependencies:

$ git clone -o upstream -b master --single-branch https://github.com/weldr/welder-web
$ cd welder-web/
$ npm install                   # Install project dependencies listed in package.json

Step 3. Compile and launch your app by running:

$ node run build
$ 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 chai and mocha.

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

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

Building a Docker image

To build the Welder web application as a Docker image see README.docker

License

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

Application internals

    ✓ 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)

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

Made with ♥ by the Welder team and its contributors

About

License:MIT License


Languages

Language:JavaScript 95.6%Language:CSS 2.9%Language:HTML 0.8%Language:Nginx 0.6%Language:Shell 0.1%