cloudify-ui-common-frontend
v2.1.0
Published
Common Cloudify UI frontend library
Downloads
364
Readme
Cloudify UI Common Frontend
This package contains common static assets (images, fonts, styles, etc.) as well as TypeScript library with functions reusable across Cloudify UI frontend applications.
Installation
npm install cloudify-ui-common-frontend
Usage
To load the package into your environment use one of the below presented option for getting icons module.
ES module
import { icons } from 'cloudify-ui-common-frontend';
CommonJS
const icons = require('cloudify-ui-common-frontend').icons;
Browser
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
Check jsDelivr home page for details about the URL format. You can get specific version and/or specific file from the package.
Documentation
Development
Development environment is set up to enforce good practices in TS development (static code analysis, style formatting, code coverage check).
Some general guidelines for different type of assets are listed below.
Static files
- add new assets to dedicated folder for specific type
- when removing assets verify that it is not used anywhere
- if relevant and possible add documentation on asset usage (eg. in README.md file in the same folder as asset)
- there is Cloudify Brandbook containing Cloudify Brand Guidelines we should follow creating new resources
TypeScript library
- add new code to
src
folder - remember to export new files in
src/index.ts
(otherwise the new code will not be available in the distribution package) - build:
npm run build
(production build) ornpm run dev
(automatic rebuilding) - test:
npm run test
(unit testing with Jest testing framework),npm run lint
(static analysis, code style check) andnpm run check-types
(TypeScript types check) - document your code (we are using JSdoc block tags)