@fstn/react-library v1.0.842
Example typescript react component library
An example project setup that allows for publishing a TypeScript React component module to npm.
Initially setup using create-react-library and converted to use TypeScript.
Project structure
The project contains a src directory containing the module files that get published to npm, and an example directory containing a working create-react-app project that contains an example usage of the module.
CI
This example also includes a .gitlab-ci.yml which publishes the module to npm (based on this guide) and deploys an example build to GitLab pages.
Development
Setup
Module
Whilst in the root directory, install dependencies
npm installTo run in watch mode
npm startTo build
npm run buildExample create-react-app
First, cd into the example directory
cd exampleInstall dependencies
npm installTo run development server
npm startTo build
npm run buildContributing
Please read CONTRIBUTING.md.
Deployed Module
Install
npm install --save example-typescript-react-component-libraryUsage
import * as React from "react";
import MyComponent from "example-typescript-react-component-library";
class Example extends React.Component {
render() {
return <MyComponent />;
}
}4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago