0.0.5 • Published 1 year ago

@dmno/netlify-platform v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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 npm

This package provides a set of prebuilt types and environment variables for Netlify.

Installation

npm add @dmno/netlify-platform

Example 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',
      }),
    },
  },
});
0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago