@g123jp/app-ctr-navbar
v1.0.6
Published
A react + ts package template with rollup,
Downloads
2
Keywords
Readme
react-ts-package-template
A react + ts package template with rollup,
feel free using it to create a new UI package.
(ref to: tree-shakable-component-library)
links:
- npm package: creating-and-publishing-scoped-public-packages
- use & test your package locally: yarn link
- the visualization to check the bundle size of your app: source-map-explorer
- vite build with sourcemap
used dependencies
Important note
Deploying
- change version in
package.json
file - run
yarn build
- replace all the code in a
types-package/index.d.ts
file with the following code.
import React from 'react';
import { G123NavigationSideBarProps } from './type';
export declare function renderComponent(
props: G123NavigationSideBarProps,
): void;
declare global {
namespace G123NavigationSideBar {
const NavigationSideBar: React.NamedExoticComponent<G123NavigationSideBarProps>;
function renderComponent(props: G123NavigationSideBarProps): void;
function login(jwt: string): void;
}
}
- run
npm publish --access public --tag latest --registry https://registry.npmjs.org/ --package-lock false --json