Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 2.38 KB

File metadata and controls

61 lines (49 loc) · 2.38 KB

3.0.0 (October 15, 2019)

Create Flex Plugin 3.0 uses the Twilio Functions & Assets API to build and deploy your plugin directly from the command line.

Highlights

  • Twilio Functions & Assets API support
  • Bumped all dependencies to the latest version (Craco, Create React App, etc)
  • Unified all scripts under a new flex-plugin-scripts repo

Migrating from 2.x to 3.x

To update existing plugins, edit package.json and modify the scripts:

{
  "scripts": {
    "bootstrap": "flex-plugin check-start",
    "prebuild": "rimraf build && npm run bootstrap",
    "build": "flex-plugin build",
    "clear": "flex-plugin clear",
    "predeploy": "npm run build",
    "deploy": "flex-plugin deploy",
    "eject": "flex-plugin eject",
    "postinstall": "npm run bootstrap",
    "list": "flex-plugin list",
    "remove": "flex-plugin remove",
    "prestart": "npm run bootstrap",
    "start": "flex-plugin start",
    "test": "flex-plugin test --env=jsdom"
  },
  "dependencies": {
    "craco-config-flex-plugin": "^3",
    "flex-plugin": "^3",
    "flex-plugin-scripts": "^3",
    "react": "16.5.2",
    "react-dom": "16.5.2",
    "react-emotion": "9.2.6",
    "react-scripts": "3.4.1"
  },
  "devDependencies": {
    "@twilio/flex-ui": "^1",
    "babel-polyfill": "^6.26.0",
    "enzyme": "^3.10.0",
    "enzyme-adapter-react-16": "^1.14.0",
    "rimraf": "^3.0.0"
  }
}

The Functions & Assets API uses a different version of Assets than the existing version of Twilio Console Assets. When you use the deploy command to deploy your plugin, you will need to delete the original plugin file from Twilio Console Assets. Otherwise Flex would attempt to load your plugin twice.

Breaking Changes

Version 3 is backward compatible with version 2. This release adds a way to upload your plugin directly to Twilio without needing to drag-and-drop the bundle in the Twilio Console.

New Features

Deploying to Twilio Assets

The new Flex plugin builder adds the ability to deploy to Twilio Assets directly from your CLI. It enables you to build and deploy your plugins directly from the CLI by leveraging the Functions & Assets API. This allows you to integrate your plugin development within a CI/CD pipeline.