@fpg-sample-modules/fk-cp-utils

0.0.1 • Public • Published

##fk-cp-utils

A npm module, which provides the common implementations of bridge methods, Utils, common components, and other helpers, to be used across all the apps, as a part of node module.

The structure of the node_modules looks like below:- react src

#react (Temporary there, will be removed once it is incorporated in fk-ui-common npm) react- All the required common components that are required by the apps can be exposed from here. For now we are just exposing Header as a component. Client can access these common components directly from sdk. For eg. import Header from 'fk-cp-utils/react/components/Header';

src- All the required bridge methods resides here and are exposed to the client. Like MapiApiClient, ImageResolver, OmnitureModule etc:- These can be access like below:- import { MapiApiClient } from 'fk-cp-utils'; import { OmnitureModule } from 'fk-cp-utils';

All the platform related intricacies are taken out from client and are handled in the bridge methods. For ex passing sn and sc in the mapi api call. And to pass sn and sc from where to read the same.

##Steps to publish the version:

  1. Create an account in global npm registry : https://www.npmjs.com/

  2. npm login: Comment the flipkart registry and un-comment the global registry entry in .npmrc, to get logged in to the global registry.

    Username: [npmjs created username] Password: [npmjs Password] Email: [flipkart email address].

If 2FA is enabled, there will be one more ask for 2FA OTP Authenticator(OTP) :[add from the Authenticator].

Once user is logged, it will show the registry, where the user is logged as.

  1. npm publish, update the package.json, for the new changes and then run the command. If 2FA is enabled, there will be ask for the OTP, please add and proceed further.

Readme

Keywords

none

Package Sidebar

Install

npm i @fpg-sample-modules/fk-cp-utils

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

125 kB

Total Files

69

Last publish

Collaborators

  • bisvarup
  • sangeetakhan