JSPM

@netlify/config

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 239271
  • Score
    100M100P100Q212226F
  • License MIT

Netlify config module

Package Exports

  • @netlify/config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@netlify/config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Netlify Config

Netlify can be configured:

This library loads, validates, and normalizes the Netlify configuration.

Install

npm install @netlify/config

Usage (CLI)

$ netlify-config
{
  "configPath": "/home/me/cv-website/netlify.toml",
  "buildDir": "/home/me/cv-website",
  "config": {
    "build": {
      "command": "gulp build",
      "functions": "/home/me/cv-website/functions",
      "publish": "/home/me/cv-website/build",
      "environment": {
        "NODE_VERSION": "12",
        "AWS_LAMBDA_JS_RUNTIME": "nodejs10.x"
      }
    },
    "plugins": []
  },
  "context": "production",
  "branch": "master",
  "siteInfo": {}
}

Usage (Node.js)

const getNetlifyConfig = require('@netlify/config')

const { configPath, buildDir, config, context, branch, siteInfo } = await getNetlifyConfig()