In src/index
need to add export that will be imported in future like import Component from 'mrkter-shared-components'
- Need to update version in
package.json
PATCH: Bug fixes (e.g., 1.0.1 → 1.0.2).
MINOR: New features (e.g., 1.0.1 → 1.1.0).
MAJOR: Breaking changes (e.g., 1.0.1 → 2.0.0).
Or just use commands
npm version patch # For patch updates
npm version minor # For minor updates
npm version major # For major updates
npm run build
- Currently optional step (No test added): Test lib
npm link
cd /path/to/test-project
npm link your-library-name
- Login into NPM:
npm login
- Publish:
npm publish
- Convert publick into private package
- Update
package.json
{
"name": "@mrkter/mrkter-shared-components",
"version": "0.1.0",
"private": true
}
- Add into
package.json
"publishConfig": {
"access": "restricted"
}
<Divider />
type DividerProps = {
orientation?: Orientation;
color?: NewColor;
margin?: number;
};
<DropdownWithIcon />
type DropdownWithIconProps = {
icon?: ReactNode;
role: UserGroup;
align: DropdownAlign;
ariaLabel: string;
innerComponent: InnerComponent[];
buttonText?: string;
disabled?: boolean;
rowData?: unknown;
};