Skip to content

Latest commit

 

History

History
123 lines (86 loc) · 2.74 KB

README.md

File metadata and controls

123 lines (86 loc) · 2.74 KB

license npm

Characteristics

  • Coded in ES6+ or TypeScript, easily compile and generate production code
  • Supports multi environment, including default browsers, Node, AMD, CMD, Webpack, Rollup, Fis and so on.
  • Integrated jsmini

Note: When export and export default are not used at the same time, there is the option to turn on legacy mode. Under legacy mode, the module system can be compatible with IE6-8. For more information on legacy mode, please see rollup supplemental file.

Compatibility

Unit tests guarantee support on the following environment:

IE CH FF SF OP IOS Android Node
11+ 100+ 100+ 16+ 100+ 10.3+ 4.1+ 14+

Here is a demo

Directory

├── demo - Using demo
├── dist - Compiler output code
├── doc - Project documents
├── src - Source code directory
├── test - Unit tests
├── CHANGELOG.md - Change log
└── TODO.md - Planned features

Usage Instructions

Using npm, download and install the code.

$ npm install --save cyz-form

For node environment:

const CyzForm = require('cyz-form');

For webpack or similar environment:

import CyzForm from 'cyz-form';

For browser environment:

<script src="node_modules/cyz-form/dist/cyz-form.full.min.js"></script>

For embeding form:

<h2>Form 1 - With selector</h2>
<div class="my-form"></div>
<script>
  const form = CyzForm.FormBuilder.create({
    selector: '.my-form',
    formId: 'FORM_ID_HERE', // replace Form ID
    portalId: 'PORTAL_ID_HERE', // replace Portal ID
  });
  console.log(form);
</script>

<h2>Form 1 - Without selector</h2>
<script>
  const form = CyzForm.FormBuilder.create({
    formId: 'FORM_ID_HERE', // replace Form ID
    portalId: 'PORTAL_ID_HERE', // replace Portal ID
  });
  console.log(form);
</script>

Documents

API

Contribution Guide

For the first time to run, you need to install dependencies firstly.

$ npm install

To build the project:

$ npm run build

To run unit tests:

$ npm test

Contributors

contributors

Change Log

CHANGELOG.md

TODO

TODO.md