A utility library for Formcentric applications, providing frontend tooling for applications using Formcentric forms.
npm install @formcentric/utils
# or
yarn add @formcentric/utils
# or
pnpm i @formcentric/utils
The library provides a comprehensive theme management system for Formcentric themes.
The library provides a CLI tool for theme management:
# Create a new theme
pnpm fc-utils-themes create
# Update existing themes
pnpm fc-utils-themes update
# Reset themes to their default state
pnpm fc-utils-themes reset
# Generate theme list
pnpm fc-utils-themes list
# Show help
pnpm fc-utils-themes --help
You can also use the theme management library programmatically:
import { create, update, reset, generateThemeList, prebuild, ThemeType } from '@formcentric/utils/themes'
// Create a new theme
await create()
// Update existing themes
await update()
// Reset themes to their default state
await reset()
// Generate theme list
await generateThemeList()
// Prebuild themes for production
await prebuild()
The library provides Vite plugins for building and watching Formcentric Themes during local development:
import { fcThemeBuilder, fcThemeWatcher, fcIIFE } from '@formcentric/utils/themes'
// In your vite.config.ts
export default defineConfig({
plugins: [fcThemeBuilder(), fcThemeWatcher(), fcIIFE()],
})
The theme management system is configurable through a configuration file. The default configuration includes:
- File paths for theme sources and outputs
- Theme variant handling
- Custom theme file templates
- Reset paths
UNLICENSED - Proprietary software by Formcentric
Formcentric