1.3.0 • Published 5 years ago

@lundiak/react-sum v1.3.0

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

React Sum

Experimental ReactJS component to show sum of 2 numbers.

Experiment related to Component creation process and usage of tolls, such as: npm, ESLINT, Webpack, Babel, Create React App, React Scripts, Storybook, Jest, Enzyme, Cucumber and CI tools.

TravisCI CircleCI SemaphoreCI AppVeyorCI 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

PropDescriptionDefault value
aa2
bb2

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

1.3.0

5 years ago

1.2.21

5 years ago

1.2.20

5 years ago

1.2.19

5 years ago

1.2.18

5 years ago

1.2.17

5 years ago

1.2.16

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.2.13

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago