Giter VIP home page Giter VIP logo

a-react-library's Introduction

a-react-library

npm_version license

A placeholder for making open source react components/library



Overview

Installation

npm install a-react-library

Usage

import { MyComponent } from 'my-component';

// ...

<MyComponent myProp="myValue" />

Props API

MyComponent

A component example

Property Type Required Default value Description
myProp string yes A random prop

Developers

Development

You should use YARN for development as NPM seems to be causing some issues! (Using NPM for just installing and using as a component is OK)

Demo app

  • yarn start for live-testing the demo app

Storybook

  • yarn storybook for live-testing the storybook app

GitHub Page

  • yarn github-page for testing a temporary build of the full github-page without an possible theme that you will choose later on GitHub (no live-testing)

Prod

Generate Readme.md

  • yarn generate-readme

Will generate a readme according to your package.json info and the following files :

    • setup_readme.md (if not present, it will use the default npm i YOUR_PACKAGE_NAME)
    • usage_readme.md
    • dev_readme.md

You can then edit your readme.md file if you need to before building/publishing/deploying

NPM

  • yarn publish

Will transpile and publish to npm, it will prompt you the version incrementing.

GitHub Page

  • yarn build

Will build the static demo and storybook apps for prod into the build folder

  • yarn deploy-github-page

Will deploy the built apps from 'build' folder to the 'gh-pages' github branch

Helper scripts

  • yarn build-and-deploy This helper script will call all the scripts for a complete GitHub building and deploying (yarn build && yarn deploy-github-page)
  • yarn publish-build-and-deploy This helper script will call all the scripts for a complete NPM and GitHub transpiling/building and publishing/deploying (yarn publish && yarn build-and-deploy)

You should then commit and push sources on GitHub the usual way.

This document was generated by the Create React Readme v1.0.7.

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.