TC React Components
These are Test Collab widgets which can be imported anywhere
Docs
Antd (UI framework) http://2x.ant.design/docs/react/introduce
Prerequisites
npm i nwb -g
NPM > 3.0
Download dependencies
npm install
or
yarn
Yarn is much faster. https://yarnpkg.com/en/docs/install
Running
To Run preview mode:
npm run storybook
Releasing the package
To build publishable library:
-
Increment the version
npm version patch
-
Build exportable js package:
npm run build
- Login to npm from cli (Username: gigapro)
npm login
- Publish to npm
npm publish
This will automatically update CDN (often within minutes)
Automatic publishing on CDN (For Production)
https://unpkg.com/tc-components-v2@latest/umd/tc-components-v2.min.js This can be embedded in app directly.
Important
Keep track of size of the library as this increases components.
- As of writing this on 14 November 2017, the v1 lib publish on production is at 178KB (gzipped) excluding react libs.
S3 URL (Development build)
https://s3.amazonaws.com/builds-gigabro/gigapromoters/tc-components/master/latest/tc-components-v2.min.js
https://s3.amazonaws.com/builds-gigabro/gigapromoters/tc-components/master/latest/main.css
Gotchas
PhantomJS sometimes fails, use this to install binary:
npm install phantomjs-prebuilt@2.1.13 --ignore-scripts
testing slack