cs-uniforms-sdk v2.0.2
CSUniformsSDK
This SDK allows you to list and submit Uniforms to Česká spořitelna a.s. UniForms API.
CHANGELOG
Usage
Uniforms SDK has a peer dependency on CSCoreSDK.
If you just want to use the SDK, there are compiled files ready to be used in the /dist folder.
You can just copy these files directly from the repository or preferably, use npm to install it into your project:
npm install cs-core-sdk --save
npm install cs-uniforms-sdk --saveUsage in browser
For usage in browser, pickup the following files from the /dist folder:
cs-uniforms-sdk.sfx.js- CSCoreSDK packaged for browserscs-uniforms-sdk.sfx.d.ts- CSCoreSDK typings for browserscs-uniforms-sdk.sfx.js.map- CSCoreSDK sourcemap for browsers
Include the cs-core-sdk.sfx.js from CSCoreSDK in your page before the cs-uniforms-sdk.sfx.js:
<script src="./node_modules/cs-core-sdk/dist/cs-core-sdk.sfx.js"></script>
<script src="./node_modules/cs-uniforms-sdk/dist/cs-uniforms-sdk.sfx.js"></script>The Uniforms SDK will be available in global variable CSUniformsSDK.
IMPORTANT! CSAS SDKs depend on a native ES6 Promise implementation to be supported. If your environment doesn't support ES6 Promises, you can polyfill.
Usage in node
For usage in node, install it through npm (see above). You can then require it by:
var CSUniformsSDK = require('cs-uniforms-sdk');Configuration
Before using any CSAS SDKs in your application, you need to initialize CSCoreSDK by providing it your WebApiKey.
CSCoreSDK.useWebApiKey( "YourApiKey" )
//Get the uniforms client
var uniformsClient = CSUniformsSDK.getClient();See CoreSDK configuration guide for all the available configuration options.
Usage Guide
See Usage Guide for usage instructions.
Development
The SDK itself is written in TypeScript, packaged by webpack, tested by jasmine & karma and distributed thorugh npm. It uses tsd for TypeScript definitions.
In order to to develop upon this SDK, you will need the following installed globally:
node&npmwebpack- For packagingkarma- For testingtsd- For downloading typescript definitions
Setup
After cloning the rpeo, run the following command to initialize the repository for development:
npm install && tsd installYou can verify everything worked as expected by running:
npm testDirectory structure
This project uses the following directory structure:
dist- Packaged version of this SDK ready for use.build- Build artifacts (not checked in repository)lib- The SDK itselfspec- Tests for the SDKtypings- Typings used by the SDKtooling- Commands for building and packaging
Development commands
npm run clean- cleansbuildanddistfoldersnpm run build- performscleanand builds the SDK intobulidfolder. It also generates.d.tsfiles usinggenerate-tsdcommand.npm run dist- performsbuildcommand and copies the packaged SDK files intodistfoldernpm run test- performsbuildand runs tests in node and browser.npm run test-browser- performs tests only in browsernpm run test-node- performs tests only in nodenpm version [major|minor|patch]- releases new version of the SDK. Requires write access to repository. See npm-version for more details.
Contributing
Contributions are more than welcome!
Please read our contribution guide to learn how to contribute to this project.
Terms & conditions
Please read our terms & conditions.