@aforms/aformsjs
TypeScript icon, indicating that this package has built-in type declarations

0.0.46-beta • Public • Published

styled with prettier Travis Dev Dependencies Inline docs HitCount Known Vulnerabilities

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 suite
  • npm start: Run npm run build in watch mode
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run test:prod: Run linting and generate coverage
  • npm run build: Generate bundles and typings, create docs
  • npm run lint: Lints code
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't 😉)

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

License

The MIT License (MIT)

Readme

Keywords

none

Package Sidebar

Install

npm i @aforms/aformsjs

Weekly Downloads

9

Version

0.0.46-beta

License

MIT

Unpacked Size

4.89 MB

Total Files

133

Last publish

Collaborators

  • aformsadmin