@formcentric/utils
v0.0.1
Published
Formcentric utility library providing frontend tooling.
Downloads
8
Readme
Formcentric Utilities
A utility library for Formcentric applications, providing frontend tooling for applications using Formcentric forms.
Installation
npm install @formcentric/utils
# or
yarn add @formcentric/utils
# or
pnpm i @formcentric/utilsFeatures
Theme Management
The library provides a comprehensive theme management system for Formcentric themes.
CLI
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 --helpAPI
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()Vite Plugins
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()],
})Configuration
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
License
UNLICENSED - Proprietary software by Formcentric
Author
Formcentric
