@dmno/netlify-platform
v0.0.5
Published
tools to use dmno with netlify
Downloads
15
Readme
Check out the docs for more information on how to use DMNO with Netlify.
If you have any questions, please reach out to us on Discord.
@dmno/netlify-platform 
This package provides a set of prebuilt types and environment variables for Netlify.
Installation
npm add @dmno/netlify-platformExample Usage
import { defineDmnoService, switchBy, pickFromSchemaObject } from 'dmno';
import { NetlifyEnvSchema } from '@dmno/netlify-platform/types';
export default defineDmnoService({
schema: {
...pickFromSchemaObject(NetlifyEnvSchema, 'CONTEXT', 'BUILD_ID'),
APP_ENV: {
value: switchBy('CONTEXT', {
_default: 'local',
'deploy-preview': 'staging',
'branch-deploy': 'staging',
production: 'production',
}),
},
},
});