1.0.1 • Published 3 years ago

hybrbase v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@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

  1. Make sure you're on at least node v12.x. If you have NVM installed, simply run nvm use in this directory to configure the node version.

  2. Create a .env.local & .env.production file and put the following in

  1. Clone this repo and run the following commands to start development with Storybook.
yarn storybook

Go 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.ts

Building

To build your project, run npm run build.

Publishing

npm publish

This 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.

1.0.1

3 years ago

1.0.0

3 years ago