Netlify SDK utility tools reference
The Netlify SDK comes with a small tooling library called netlify-integration
. It allows you to perform tasks like creating and building your integration, as well as previewing your connector GraphQL server or your integration UI.
Install
Install the Netlify SDK utility tools globally using your preferred package manager:
Make sure your project includes the appropriate scripts
When you use the SDK’s guided set-up flow to create an integration, we automatically add scripts to your project that run the appropriate netlify-integration
commands. If you skipped the guided set-up flow, make sure you manually update your package.json
to include scripts for the commands you want to run. For example, "dev": "netlify-integration dev"
.
Commands
build
This builds your integration. By default, it builds all components necessary for your integration to work including any Connectors, Build Event Handlers, API Handlers, or Integration UI.
Flags
Flag | Type | Description |
---|---|---|
-a, --all | boolean | Build all components of the integration |
-c, --connector | boolean | Build the connector component of the integration |
-w, --watch | boolean | Build integration and then watch for changes |
-b, --buildtime | boolean | Build the buildtime component of the integration |
-s, --site | boolean | Build the serverless component of the integration |
dev
This runs a local GraphQL server for your connector that makes it possible to load the graphiql UI and test queries locally.
Flags
Flag | Type | Description |
---|---|---|
-a, --all | boolean | Build all components of the integration |
-c, --connector | boolean | Build the connector component of the integration |
-b, --buildtime | boolean | Build the buildtime component of the integration |
-s, --site | boolean | Build the serverless component of the integration |
preview
This allows you to preview your Integration UI. It builds your UI and then runs a server that serves your UI and any handlers you might have.
Flags
Flag | Type | Description |
---|---|---|
-c, --connector | boolean | Preview the GraphQL server for your connector component |