@aforms/aformsjs
v0.0.46-beta
Published
Enhanced forms library built using fomantic-ui, jQuery and form.io.
Downloads
167
Readme
AForms
Enhanced forms library built using fomantic-ui, jQuery and form.io.
Features
- Typescript ES Modules
- Customizable styles using Fomantic-ui - 2.8 and up
- Enhancing json generated using formio.js
- ADA Compatible
NPM scripts
npm t
: Run test suitenpm start
: Runnpm run build
in watch modenpm run test:watch
: Run test suite in interactive watch modenpm run test:prod
: Run linting and generate coveragenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codenpm run commit
: Commit using conventional commit style (husky will tell you to use it if you haven't :wink:)
Usage
You can download the library from npm using npm i @aforms/aformsjs -D
Please note that this library requires jquery, ensure the build tool is properly setup.
Developer environment (Customizations)
For developers who intend to develop or use the library with typescript:
- import { AFormModelClass } from '@aforms/aformsjs'
Since library uses jquery, and it's plugins you need to add jquery to your tsconfig.
Install jquery
npm i @types/jquery -D
Add jquery to types array in tsconfig
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../dist/out-tsc", "types": [ "jquery" ] }, "files": [ "./../../node_modules/@aforms/aformsjs/src/typings.d.ts", "./../../node_modules/@aforms/aformsjs/src/index.ts" ], "include": [] }
This will ensure your typescript compiler can read all required modules properly, additionally you get the comfort of debugging source code using typescript.
For accessing as javascript use
- import { AFormModelClass } from '@aforms/aformsjs/build' for es modules
- import { AFormModelClass } from '@aforms/aformsjs/build/cjs/a-forms.cjs.js' for cjs
- import { AFormModelClass } from '@aforms/aformsjs/build/umd/a-forms.umd.js' for umd