@touche-lts/panel-ui
v0.1.1
Published
A react package consist of custom UI components for React Project
Readme
@touche-lts/panel-ui
A React package consisting of custom UI components for React projects. This library provides pre-built, reusable components to streamline UI development.
Features
- Built using React and Material-UI.
- Includes support for MobX for state management.
- Provides custom date range pickers, drag-and-drop functionality, and more.
- Pre-configured TypeScript for type safety.
- Optimized for modern browsers.
Installation
Install the package using npm:
npm install @touche-lts/panel-uiOr with Yarn:
yarn add @touche-lts/panel-uiUsage
Here’s a basic example of using a component from the package:
import React from 'react';
import { MyCustomComponent } from '@touche-lts/panel-ui';
const App = () => {
return (
<div>
<MyCustomComponent />
</div>
);
};
export default App;Scripts
Development
Run the development server:
npm startBuild
Build the package for production:
npm run buildFile Structure
- src/: Source files of the package.
- dist/: Compiled and ready-to-publish files.
- tsconfig.json: TypeScript configuration file.
- package.json: Contains dependencies, scripts, and metadata for the package.
Publishing the Package Privately
Follow these steps to publish the package privately to the npm registry:
Scope the package:
Ensure your package name inpackage.jsonis scoped. Scoped names start with@and are followed by the scope name (e.g.,@your-org/panel-ui). Example:"name": "@your-org/panel-ui",Version requirement:
Make sure yourversionfield follows semantic versioning. Update the version number inpackage.jsonas needed before each publish (e.g.,"version": "1.0.0").Build the package:
Ensure your package is compiled and ready for distribution:npm run buildPublish the package to a private registry: Please ensure that a .npmrc file is added in root folder and contains valid authentication tokens beforehand. Use the following command to publish it as a private package:
npm publish --access=restrictedEnsure your
package.jsonincludes thepublishConfigkey, like this:"publishConfig": { "registry": "https://registry.npmjs.org" }Verify the private package:
Install the package in another project to confirm it works:npm install @your-org/panel-ui
