0.7.9 • Published 5 years ago

topcoder-react-utils v0.7.9

Weekly downloads
449
License
MIT
Repository
github
Last release
5 years ago

Dev Build Status Master Build Status Latest NPM Release NPM Downloads

Topcoder React Utils

The Topcoder collection of generic ReactJS configurations, components and utilities to be shared between all internal and external ReactJS projects developed by the Topcoder community.

Content

Installation

Install the package as

$ npm install --save topcoder-react-utils
$ ./node_modules/.bin/topcoder-lib-setup

Then import the global stylesheet into the root ReactJS component of your app:

/* eslint-disable global-require */
if (process.env.NODE_ENV === 'production') {
  require('topcoder-react-utils/dist/prod/style.css');
} else {
  require('topcoder-react-utils/dist/dev/style.css');
}
/* eslint-enable global-require */

To upgrade this library to the latest version just execute again

$ ./node_modules/.bin/topcoder-lib-setup

Reference

Configurations

Components

  • Avatar The standard component for user avatars;
  • Button Handles buttons and button-like links (components that look like regular buttons, but behave as links) in the same uniform manner;
  • Link and NavLink Auxiliary wrappers around React Router's <Link> and <NavLink> components; they help to handle external and internal links in the same uniform manner;
  • Modal Themeable modal component;
  • ScalableRect Container that keeps the specified aspect ratio regardless the width you set.

NodeJS Scripts

  • topcoder-lib-setup Helps to install and upgrade topcoder-react-utils and other similar libraries.

Redux Templates

  • Item An async piece of data in Redux store.

Utilities

  • Client Client-side initialization code.
  • Config Isomorphic app config;
  • Global Styles Global styles necessary for a generic application;
  • Isomorphy Collection of helpers to deal with isomorphic aspects of the code;
  • Jest utils Collection of helpers to be used in Jest tests code;
  • Redux utils TO BE DOCUMENTED
  • SCSS Mixins Collection of useful style mixins;
  • Server Easy creation and launch of web-server with standard configuration, that serves a ReactJS application with or without server-side rendering, supports development tools (Hop Module Reloading), and can be further configured for the needs of specific projects.
  • Webpack Various utils related to the Webpack bundling process.

Development

For convenient development you can link this package into your host package: 1. Clone topcoder-react-utils to your machine, and checkout the branch you are going to work with; 2. Inside topcoder-react-utils folder: - Install dependencies with $ npm install; - Locate node_modules/extract-css-chunks-webpack-plugin/index.js and inside the isChunk(..) function (line #358) add return true; statement, so that this function always returns true. This step is necessary at the moment, because the check chunk instanceof Chunk check inside this function does not work as expected when Webpack config is spread across multiple inter-linked packages. - Run the dev build $ npm run build:dev. It will compile the package, and also will watch for the file changes to automatically re-compile it as necessary. 3. Inside the host package execute $ npm link PATH_TO_TOPCODER_REACT_UTILS_FOLDER. It will create a symlink from HOST_PACKAGE/node_modules/topcoder-react-utils to your local copy of the topcoder-react-utils package, so that any changes you do there become automatically available to the host package.

CI/CD is set up with CircleCI 2.0 for this repo. A commit to any branch, beside master will trigger testing of the commited code (it will run $ npm test and ensures that it does not fail). A commit to the protected master branch (only organization members and repo admins can commit to master) will trigger the testing, and, if successful, release of the updated package to the NPM registry.

For successful release to NPM you should bump the package version in the package.json. To do it conveniently you can use $ npm version UPDATE_TYPE command, where UPDATE_TYPE stays for one of patch/minor/major to bump up 2, 1, or 0 in a sample version number v0.1.2. This command will update package.json and package-lock.json, and create a new commit and tag in the checked-out Git branch. Mind that patch updates should not introduce any breaking changes into the codebase! Breaking changes should be done via minor or major update, and they should be documented in the CHANGELOG.

License

Topcoder React Utils is MIT Licensed

0.7.8-2

5 years ago

0.7.9

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.8.1

6 years ago

0.7.6

6 years ago

0.8.0

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.0

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.8

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.12

6 years ago

0.3.11

6 years ago

0.3.10

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.39

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.35

6 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago