Giter VIP home page Giter VIP logo

react-components's Introduction

Watson Developer Cloud React Components

Build Status npm-version

A collection of React components to write web applications using the Watson APIs.

Documentation: https://watson-developer-cloud.github.io/react-components/

Getting Started

  1. Install the library

    npm install --save watson-react-components
    
  2. Add components to your React file where needed:

    Example:

    import { Header, Footer, /*...*/} from 'watson-react-components';
  3. Make the assets public. For a Node.js/Express server, the following code should work:

    app.use(express.static('./node_modules/watson-react-components/dist/'));

    For other environments, check out the code and run npm install; npm run build and then copy the contents of the dist/ directory into your static folder.

  4. Add a reference to the stylesheet.

    <link rel="stylesheet" type="text/css" href="/css/watson-react-components.min.css">

    Adjust the href as necessary if a different location was chosen in step 3

How to Contribute

  1. Install Dependencies

    npm install
    
  2. Start the development server

    npm run dev
    

Changes will refresh the page thanks to browsersync.

  1. Run the build command before pushing merge request:

    npm run build
    

Directory structure

.
├── README.md
├── dist
│   ├── components      // ES5 react components
│   ├── css
│   ├── images
│   ├── js
│   └── scss
├── example
│   ├── build
│   ├── index.html
│   └── src
├── gh-pages
│   ├── build
│   ├── images
│   ├── index.html
│   └── src
├── gulpfile.js
├── package.json
├── src
│   ├── components      // React components
│   └── stylesheets     // Sass files
└── static              // static files
    └── images          // images

License

This sample code is licensed under Apache 2.0.

Contributing

See CONTRIBUTING.

Open Source @ IBM

Find more open source projects on the IBM Github Page

react-components's People

Contributors

aclm avatar aprilwebster avatar germanattanasio avatar jeff-arn avatar jzhang300 avatar kognate avatar lpatino10 avatar mamoonraja avatar nfriedly avatar samuelcouch avatar

Watchers

 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.