Giter Site home page Giter Site logo

ui-component-library-recipes's Introduction

Boilerplate UI Component Library

Node.js CI Deploy Static StorybookPublish package

Recipe components built on React Storybook

Demo

Tools & Frameworks

  1. React Storybook for UI components

  2. TypeScript for type-safety

  3. Rollup for bundling the package

  4. Husky for performing pre-push checks

  5. Concurrently for running pre-push checks in parallel

Features

  1. Automatic lint fixes using EsLint

  2. Storybook Story snippet

  3. Story interaction test example

  4. @storybook/addon-links for linking from one story to another

  5. Auto-deploy Storybook to GitHub pages (demo above)

Getting started

Run the app

Option 1: Using local environment:

nvm use # Switches to Node version defined in .nvmrc
npm ci
npm run dev

Option 2: Running in Docker:

npm run dev:docker

View the component library

open http://127.0.0.1:6006

How to use

  1. Register the GitHub Package Registry in your .npmrc file (additional docs):
# .npmrc
@olivercaine:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_GITHUB_TOKEN>
  1. Install the package:
npm install @olivercaine/ui-component-library-recipes@latest

or

yarn install @olivercaine/ui-component-library-recipes@latest

Older versions can be found in the packages page.

  1. Import the package into your app:
import { Ingredients } from '@olivercaine/ui-component-library-recipes'
import { recipes } from '@olivercaine/recipe-data'
import * as React from 'react'

export const MyComponent = () =>
  <>
    {/* Your custom code */}
   <Ingredients recipe={recipe}/>
  </>
  1. Example recipe data can be installed from olivercaine/recipe-data

How to run locally

  1. npm ci
  2. npm run dev

Credits

  1. https://tailblocks.cc for providing helpful pre-built components

Troubleshooting

Not allowed to write organization package

Error message:

Permission installation not allowed to Write organization package

Cause:

You may be trying to publish to an NPM repositoryw which doesn't belong to you

Solution:

Make sure that the name in package.json starts with @[GitHub username]/

Write package permission denied

Error message:

Permission permission_denied: write_package

Cause:

GitHub Actions does not have permission to publish the package

Solution:

Enable [GitHub Repo] > Settings > Actions > General > "Read and write permissions"

Todo

  1. Placeholder images    
    1. Rename Placeholders.stories-disabled.tsx to enable it
    2. Fix import of placeholder images
  2. Gracefully handle missing images
  3. Change main logo

ui-component-library-recipes's People

Contributors

olivercaine avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.