Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/app-scripts

Package Overview
Dependencies
Maintainers
100
Versions
511
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/app-scripts

A collection of scripts for building Contentful Apps

  • 0.4.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by19.26%
Maintainers
100
Weekly downloads
 
Created
Source

@contentful/app-scripts

This project makes easy to perform some recurrent operations in Contentful's App Framework.

📥 Installation

Locally:

npm i --save @contentful/app-scripts

Globally:

npm i -g @contentful/app-scripts

⚙️ Usage

💻 CLI

When installed

$ contentful-app-scripts create-app-definition 

Otherwise

$ npx --no-install @contentful/app-scripts create-app-definition 

👨‍💻 Programmatic

// my-script.js

const { createAppDefinition } = require('@contentful/app-scripts')
const { myCustomLogic } = require('./my-custom-logic')

(async function main() {
  myCustomLogic();
  
  await createAppDefinition.interactive()
})()

📜 API

Scripts exported from this module will all be in the following shape

interface Script<Result, Options> {
  // query the user or local cache for required information
  interactive: () => Result;
  // run by automation (`--ci` flag), they would need all the information upfront
  nonInteractive: (...options: Options) => Result;
}

:warning: Please note

Both interactive and nonInteractive version of the same script is meant to return the same result.

Create App Definition

Allows creating a new AppDefinition provided a Content Management Token (more details here).

It only runs in interactive mode.

Example

$ contentful-app-scripts create-app-definition

FAQs

Package last updated on 14 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc