@saloodo/ui-kit

7.0.1 • Public • Published

UIKit

Saloodo UIKit

Getting Started

npm install

Publish New Version

If you want to publish a new version in npm, we have these npm commands publish-patch, publish-minor, publish-major run one of them on master (depending on the changes) after merging your work.

npm run publish-patch
# OR
npm run publish-minor
# OR
npm run publish-major

Once, the tag is created and npm package is published go to Github releases and create new release with description (some lines like below - PRs included in the release)

#pr id : small description on the changes introduced here

Installing locally

If you want to install the library from your local folder within your project, please remember to run the build npm run build. Once the build is done you can go to your project and run npm install path_to_the_library.

CRA (Create React App) applications

Overriding CRA's webpack config is not easy. As a solution we need to depend on other packages to do this job for us.

Install react-app-rewired and update start command

npm i -D react-app-rewired

react-scripts start

react-app-rewired start

Create a file config-overrides.js in the root of app with following content

const path = require('path');

/**
 * Config override is used only for development purpose
 *
 * @param {*} config
 */
module.exports = function override(config) {
  config.resolve = {
    ...config.resolve,
    alias: {
      ...config.resolve.alias,
      'styled-components': path.resolve('node_modules', 'styled-components'),
      react: path.resolve('node_modules', 'react'),
      'react-dom': path.resolve('node_modules', 'react-dom'),
    },
  };

  return config;
};

Other applications

You may face some issues related to styled-component theme not being defined in the components of ui-kit, in that case, please refer to this source SC Duplicated module in node_modules. In brief, make sure you add the styled-components alias in your webpack config:

  resolve: {
    alias: {
      "styled-components": path.resolve("node_modules", "styled-components"),
    }
  }

Note: Do not commit package files with your local version. ("@saloodo/ui-kit": "file:../../uikit",)

Package Sidebar

Install

npm i @saloodo/ui-kit

Weekly Downloads

31

Version

7.0.1

License

MIT

Unpacked Size

1.95 MB

Total Files

446

Last publish

Collaborators

  • saloodo