Giter Site home page Giter Site logo

fossabot / react-sum Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 5.58 MB

ReactJS component to show sum of 2 numbers, as npm package.

Home Page: https://alundiak.github.io/react-sum/storybook-static/

JavaScript 79.47% HTML 16.60% Gherkin 1.18% CSS 2.76%

react-sum's Introduction

React Sum

Experimental ReactJS component to show sum of 2 numbers, as npm package.

TravisCI CircleCI SemaphoreCI FOSSA Status

Consumer Usage

Installation

npm install --save @lundiak/react-sum

Import the component where you want to use it, and you ready to use it in render().

Approach 1:

import ReactSum from '@lundiak/react-sum'

<ReactSum.Sum />

Approach 2:

import { Sum } from '@lundiak/react-sum';

<Sum />

Props

Prop Description Default value
a a 2
b b 2

Example

Your file MyApp.jsx:

import React, { Component } from 'react';
import { Sum } from '@lundiak/react-sum';

class MyApp extends Component {
  render() {
    return (
        <Sum a={2} b={3}/>
    );
  }
}

export default MyApp;

Development

Installation

npm install

Tests

npm test

Style Guide vs. Documentation

Storybook

To run locally:

npm run storybook

Docz and Styleguidist and other

Publish new version

npm version patch

Note: it will run:

  • npm run prodBuild to build JSX files into dist folder.
  • npm test to verify Component logic (but for now Jest and Cucumber uses dist folder files).
  • npm run build-storybook to build local, static version of Storybook ready for publish.
  • will add changes files to git commit and publish changes.
  • Using patch will increase SemVer patch only.

Resources

About npm main, browser and module, jsnext:main, esm, esnext(2017)

If package.json has "main" field but not a "module" field, all files in that package are loaded as CommonJS. If a package.json has a "module" field but not "main" field, all files in that package are loaded as ES Modules. If a package.json has neither "main" nor "module" fields, it will depend on on whether an index.js or a module.js exists in the package as to whether to load files in the package as CommonJS or ES Modules respectively.

About rename .babelrc to babel.config.js and how this fix import-ing issue.

Webpack related

Math related

Testing

Jest + Enzyme

Cucumber for JavaScript

TODO

License

FOSSA Status

react-sum's People

Contributors

alundiak avatar fossabot avatar

Watchers

 avatar

Forkers

qix-

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.