@freesewing/config
FreeSewing's config package bundles configuration data for FreeSewing's websites and infrastructure.
It is published on NPM as @freesewing/config
.
The source code for this package is available in our monorepo on Codeberg
under packages/config
.
This package does not provide a default export.
Installation
npm install --save @freesewing/config
Named Exports
apikeyLevels
Holds an object where the key is the permission level for an API key (a number from 0 t0 8), and the value is a textual description of that access level.
import { apikeyLevels } from '@freesewing/config'
cloudflare
Holds an object with information about Cloudflare's image service which FreeSewing uses for hosting images.
import { cloudflare } from '@freesewing/config'
control
Holds an object with the configuration of FreeSewing's control setting. This setting determines which level of UX complexity hides/reveals what features on the website.
import { control } from '@freesewing/config'
controlDesc
Holds an object with the textual description of the various control levels used by FreeSewing.
import { controlDesc } from '@freesewing/config'
degreeMeasurements
Holds an array of measurements that measure an angle, rather than a distance.
import { degreeMeasurements } from '@freesewing/config'
isDegreeMeasurement
A helper method to determine whether a measurement is a degree measurement. In other words, a measurement that captures an angle, rather than a distance.
Parameter | Type | Default | Description |
---|---|---|---|
measurement | string | undefined | The ID of a FreeSewing measurement |
Return Type | Description | ||
boolean | true of it is a degree measurement, false if not |
const result = isDegreeMeasurement('shoulderSlope')
// result now holds: true
logoPath
Holds a string that is the SVG pathstring for the FreeSewing logo, Skully.
import { logoPath } from '@freesewing/config'
measurements
Holds an array of (the IDs of) all measurements used by FreeSewing designs.
import { measurements } from '@freesewing/config'
roles
Holds an object detailing the roles for role-based access control (RBAC) on the FreeSewing backend.
import { roles } from '@freesewing/config'
sewingTechniques
Holds an array of (the IDs of) all the sewing techniques used by FreeSewing designs.
import { sewingTechniques } from '@freesewing/config'
uiRoles
Holds an array of all the roles used on the FreeSewing website.
import { uiRoles } from '@freesewing/config'
urls
Holds an array of all the roles used on the FreeSewing website.
import { urls } from '@freesewing/config'