1.0.1 • Published 5 years ago
hybrbase v1.0.1
@hybrbase/library-starter
⚡ A library starter kit and bundler for React projects, powered by Rollup.
Features
- React with TypeScript support
- Rollup for bundling (with a customizable bundler config file)
- Babel for transpiling
- Storybook for development and component explorer
- Uses TailwindCSS 2.0
- Linting before commit support with ESLint, Husky and Lint Staged
- Supports CSS modules configurable with PostCSS
- react-uuid for component key indexing
- Supports CJS and ESM formats
- Sourcemap creation
Getting Started
Make sure you're on at least node v12.x. If you have NVM installed, simply run
nvm usein this directory to configure the node version.Create a
.env.local&.env.productionfile and put the following in
- Clone this repo and run the following commands to start development with Storybook.
yarn storybookGo to localhost:6006 and you should see something like this.
Architecture
name-project/
├── build/
│ └── ...
│
└── packages/
├── docs/
│ └── ...
│
├── ui/
│ ├── components/
│ │ ├── NameComponent/
│ │ │ ├── stories/
│ │ │ ├── tests/
│ │ │ ├── NameComponent.tsx
│ │ │ ├── NameComponent.scss
│ │ │ ├── NameComponent.config.ts
│ │ │ ├── use-name-component.ts
│ │ │ └── index.ts
│ │ └── index.ts
│ │
│ ├── compositions/
│ │ └── index.ts
│ ├── contents/
│ │ └── index.ts
│ ├── effects/
│ │ └── index.ts
│ ├── forms/
│ │ └── index.ts
│ ├── sections/
│ │ └── index.ts
│ └── index.tsBuilding
To build your project, run npm run build.
Publishing
npm publishThis builds commonjs and esm versions of your module to dist/ and then publishes your module to npm.
Make sure that any npm modules you want as peer dependencies are properly marked as peerDependencies in package.json. The rollup config will automatically recognize them as peers and not try to bundle them in your module.