Skip to content

Releases: twilio/flex-plugin-builder

Release 3.0.0 (October 15, 2019)

16 Oct 00:36
Compare
Choose a tag to compare

3.0.0 (October 15, 2019)

Create Flex Plugin 3.0 uses the Twilio Serverless API to build and deploy your plugin directly from the CLI.

Highlights

  • Twilio Serverless 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

Update your global create-flex-plugin by running:

npm install --global create-flex-plugin

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

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

Breaking Changes

Version 3 is backward compatible with version 2. The new version essentially 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.

Release 2.3.0 (May 07, 2019)

07 May 16:35
Compare
Choose a tag to compare

2.3.0 (May 07, 2019)

Create Flex Plugin 2.3 brings TypeScript support.

Highlights

  • Create TypeScript Project

New Features

TypeScript

When creating a new project, you can pass the optional --typescript to create a TypeScript project instead of a JavaScript project:

npx create-flex-plugin plugin-sample --typescript

Release 2.0.0 (May 01, 2019)

01 May 22:26
Compare
Choose a tag to compare

2.0.0 (May 01, 2019)

Create Flex Plugin 2.0 upgrades to the latest Create React App 3.

Highlights

  • Create React App 3.0 support
  • Craco (Create React App Configuration Override)
  • Drops React-App-Rewired
  • Jest 24

Migrating from 1.x to 2.x

Update your global create-flex-plugin by running:

npm install --global create-flex-plugin

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

{
    "scripts": {
        "bootstrap": "flex-check-start",
        "postinstall": "npm run bootstrap",
        "prestart": "npm run bootstrap",
        "start": "craco start",
        "build": "craco build",
        "test": "craco test --env=jsdom",
        "eject": "craco eject"
    },
    "dependencies": {
        "@craco/craco": "^5.0.2",
        "flex-plugin": "^2",
        "craco-config-flex-plugin": "^2",
        "react-scripts": "^3.0.0"
    }
}

Add a craco.config.js to the directory and paste the following:

const config = require('craco-config-flex-plugin');

module.exports = {
     ...config,
     plugins: [
          // You can customize the configuration by defining your own plugins.
          // See https://github.com/sharegate/craco/tree/master/packages/craco#develop-a-plugin
          // for more detail
     ]
};

Then update public/plugins.json and update the port on src from 8085 to 3000. Finally run npm install to install/update the new dependencies.

You also need to move your jest configuration into craco.config.js, otherwise CRA will ignore them.

Breaking Changes

Create Flex Plugin upgrades from Create React App 1.x to Create React App 3.x. Please check the CHANGELOG and migration plan on CHANGELOG 1.x to 2.x and CHANGELOG 2.x to 3.x on the official Create React App GitHub page.

We have also dropped support for React App Rewired.

Jest 24

Please check Jest 24 features for any breaking changes.

Create React App 3

Please check CHANGELOG 1.x to 2.x and CHANGELOG 2.x to 3.x features for any breaking changes.

React App Rewired

We have dropped this service and instead replaced it with Create React App Config Override. See below for more detail.

New Features

Create React App 3

Please visit Create React App for all the new changes added to Create React App 3.x.

Craco

We have dropped the usage of React App Rewired and instead have added support for Create React App Configuration Override.

You can now easily provide your own configuration override for all Create React App options by editing the craco.config.js. You can easily create plugins and add them to craco.config.js.