FinalForm SDK is an npm package that provides a set of tools and utilities for working with forms in JavaScript and TypeScript applications.
To install the FinalForm SDK, use the following command:
pnpm add @expopulus/finalform-sdk
Import the FinalForm SDK in your project:
import { FinalForm } from "@expopulus/finalform-sdk";
// Example usage
const form = new FinalForm();
The following scripts are available in the package.json
:
-
build:clean
: Cleans thedist
folder.-
Command:
pnpm run build:clean
-
Purpose: Cleans the
dist
folder and then runs your esbuild script (build.mjs
) to generate the output files.
-
Command:
-
build
: Cleans thedist
directory and builds the project. -
test
: Runs the test suite using Mocha.-
Command:
mocha
- Purpose: Ensures that everything is working before publishing.
-
Command:
-
prepare
: Runs the build script.-
Command:
pnpm run build
-
Purpose: Automatically run before
npm install
locally or before publishing to build the package.
-
Command:
-
prepublishOnly
: Runs tests and builds the project before publishing.-
Command:
pnpm run test && pnpm run build
- Purpose: Ensures the package is built and tested before it is published.
-
Command:
-
postpublish
: Displays a message after publishing.-
Command:
echo 'Package published successfully!'
- Purpose: Optional script to trigger notifications or logs after publishing.
-
Command:
-
release
: Publishes the package to npm with public access.-
Command:
pnpm publish --access public
- Purpose: Publishes the package as public on npm.
-
Command:
To run the tests, use the following command:
pnpm run test
To build the project, use the following command:
pnpm run build
Ensure that the package builds and tests pass by running:
pnpm run test
pnpm run build
To deploy the npm package, follow these steps:
Publish the package to npm:
pnpm run release
After publishing, you can verify the package on NPM by running:
npm info @expopulus/finalform-sdk
This will show the details of your published package, ensuring everything is correct.
This project is licensed under the MIT License. See the LICENSE
file for more details.