Coder Social home page Coder Social logo

alkamin / indigo Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 322 KB

Create a chakra-ui based React component library with one command

JavaScript 16.32% Batchfile 0.23% TypeScript 83.45%
chakra-ui react cli component-library semantic-release github-package-registry oclif storybook typesript

indigo's Introduction

indigo

Create a chakra-ui based application component library with one command

oclif semantic-release

Version Downloads/week License

Libaries created with Indigo are pre-configured with:

  • GitHub actions based build process with semantic-release and automated changelog generation and publishing to the GitHub Package Repository (GPR) or NPM
  • TypeScript
  • Storybook

Getting started

Indigo works with node versions < v15. We encourage using nvm to easily manage your node versions.

If you're using nvm you can ensure you're on the right version with nvm use 14.

$ npx @alkamin/indigo new my-component-library
$ cd my-component-library
$ npm start

CI/CD Configuration

Defining a repository secret named RELEASE_PAT is required for the semantic release workflow. The user who owns the token will be listed as the creator of all releases triggered by the semantic release GitHub action.

Publishing to NPM

If you choose NPM as your publishing method, you will need to provide an NPM token (NPM_TOKEN) to the build process:

  • generate an NPM access token -- NPM provides helpful guidance
  • in your UI library's repository, create a secret named NPM_TOKEN and set the value to the token you created in the previous step

Changing the commit message format

By default, Indigo configures semantic-release to use the conventionalcommits preset. Read more about conventional commits You can alter the preset setting of the @semantic-release/commit-analyzer and @semantic-release/release-notes-generator plugins in your library's package.json file. Read more about configuring the commit message format

Changing the changelog file

By default, Indigo configures the build process to generate a CHANGELOG.md file. If you'd like to use a different name for the changelog file alter the configuration of the @semantic-release/changelog and @semantic-release/git plugins in your library's package.json file.

CLI usage

$ npm install -g @alkamin/indigo
$ indigo COMMAND
running command...
$ indigo (-v|--version|version)
@alkamin/indigo/1.6.2 linux-x64 node-v12.22.5
$ indigo --help [COMMAND]
USAGE
  $ indigo COMMAND
...

Commands

indigo generate COMPONENTNAME

Scaffold a new component

USAGE
  $ indigo generate COMPONENTNAME

ARGUMENTS
  COMPONENTNAME  the name of the component you want to generate

OPTIONS
  -h, --help   show CLI help
  --skipStory

See code: src/commands/generate/index.ts

indigo help [COMMAND]

display help for indigo

USAGE
  $ indigo help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

indigo new PACKAGENAME

Scaffold a new UI library

USAGE
  $ indigo new PACKAGENAME

ARGUMENTS
  PACKAGENAME  the name of the package you want to generate

OPTIONS
  -h, --help  show CLI help
  --useNpm

See code: src/commands/new/index.ts

indigo's People

Contributors

semantic-release-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar

indigo's Issues

Add tsconfig.json to stories directory

{
  "extends": "../tsconfig.json",
  "include": ["../src/**/*", "./**/*"]
}

Allows for intellisense to import from src since stories and src are siblings. Should not effect the build since we specify the config file to use.

[Security] Workflow semantic-release.yml is using vulnerable action actions/checkout

The workflow semantic-release.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

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.