Coder Social home page Coder Social logo

sandbox-react-ui-lib-with-ts

My practice project of React UI library with

  • written by TypeScript
  • distribute as JavaScript with
    • ES Modules version
    • CommonJS version
    • TypeScript declarations
  • using styled-components with css prop

Usage

Install

yarn add https://github.com/keik/sandbox-react-ui-lib-with-ts#1.0.0

and import from TypeScript / JavaScript, place in JSX.

import * as React from "react";
import * as ReactDOM from "react-dom";
import { Button } from "sandbox-react-ui-lib-with-ts";

ReactDOM.render(
  <>
    <Button>normal button</Button>
    <Button primary>primary button</Button>
  </>,
  document.querySelector("#app")
);

How to build

Sources written TypeScript
 -> (tsc with `"jsx": "preserve"`)
 -> JavaScript (es5 + JSX with raw `css` prop)
 -> (Babel with `@babel/preset-react` + `babel-plugin-styled-components`)
 -> JavaScript (es5)

Release

For no publishing to npm version assmued private package

VERSION=<new_version>

# (1) update package.json and commit
perl -i -pe 's/(?<="version": ").+(?=")/'${VERSION}'/g' package.json && \
  git add package.json && git commit -m':up: Bump up version.' && \

# (2) build and commit and create tag
yarn clean && \
  yarn build && \
  git add --force lib && \
  git commit -m':sparkles: Build for release.' && \
  git tag v${VERSION} && \
  git push origin --tag v${VERSION} && \

# reset to (1)
  git reset --hard HEAD^

results like tree of below

* 544c8c6 (HEAD -> master) :up: Bump up version.
* a9aca09 :+1: Build css props.
| * 793ceb0 (tag: v0.0.2) :sparkles: Build for release.
|/
* 00bfacb :up: Bump up version.
* 3bcaace :+1: Add package info.
| * 2165789 (tag: v0.0.1) :sparkles: Build for release.
|/
* 2bc5392 (origin/master) :up: Bump up version.
* fb7c106 :bulb: Docs about release.

KATO Kei's Projects

ac-box icon ac-box

no-dependency, lightweight autocomplete combobox UI library

autokana icon autokana

Library for automatically rendering Furigana for inputted Japanese Text

awesome-emacs icon awesome-emacs

A community driven list of useful Emacs packages, libraries and others.

awesome-gulp icon awesome-gulp

:tropical_drink: A curated list of awesome gulp resources, plugins, and boilerplates for a better development workflow automation - http://alferov.github.io/awesome-gulp

awesome-rnn icon awesome-rnn

Recurrent Neural Network - A curated list of resources dedicated to RNN

blog icon blog

Abandoned. Now using hatenablog.com (http://keik-117.hatenablog.com)

bootstrap-datepicker icon bootstrap-datepicker

A datepicker for @twitter bootstrap forked from Stefan Petre's (of eyecon.ro), improvements by @eternicode

cookbook-code icon cookbook-code

Recipes of the IPython Cookbook, the definitive guide to high-performance scientific computing and data science in Python

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.