te-prefs-lib
TE Prefs Library
Build to GCP storage bucket
3 branches trigger different environment builds
production -> triggers production build
test -> triggers test (staging) build
beta -> triggers beta build
Running:
git add .
git commit -m "commit message"
git push origin remoteBranch
will initiate a CircleCI job, and push the new artifacts to the GCP storage bucket.
After the build has finished, the minified builds will be available at:
https://storage.googleapis.com/te-prefs-lib/te-prefs-lib@${environment}.js / css
Build to NPM
Run
yarn build
npm publish
to build and upload to the private TimeEdit NPM repository
Use from CDN
Use script and link tags to include the files in the project
Javascript file: https://storage.googleapis.com/te-prefs-lib/te-prefs-lib@${environment}.js (or .es.js)
CSS file: https://storage.googleapis.com/te-prefs-lib/te-prefs-lib@${environment}.css
Use as NPM library
Install
npm install --save te-prefs-lib
Usage
import React, { Component } from 'react';
import TEPrefsLib from 'te-prefs-lib';
class Example extends Component {
render() {
return <TEPrefsLib coreAPI={teCoreAPIObj} env='desiredEnvironment' />;
}
}
License
ICT © TimeEdit