Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fusepilot/parcel-plugin-cep-starter

Starter template for parcel-cep-plugin, a zero configuration CEP extension builder for Parcel.
https://github.com/fusepilot/parcel-plugin-cep-starter

adobe cep parcel

Last synced: about 1 month ago
JSON representation

Starter template for parcel-cep-plugin, a zero configuration CEP extension builder for Parcel.

Awesome Lists containing this project

README

        

# Parcel CEP Plugin Starter

Starter template for [parcel-cep-plugin](https://github.com/fusepilot/parcel-plugin-cep), a zero configuration CEP extension builder for [Parcel](https://github.com/parcel-bundler/parcel).

## Quick Start

```sh
git clone https://github.com/fusepilot/parcel-plugin-cep-starter.git
cd parcel-plugin-cep-starter
yarn && yarn start
```

Open your CC app of choice, find your extension under `Window` > `Extensions`, and start developing.

## Building

To create a production build:

```sh
yarn build
```

## Packaging

To create a .zxp for deployment:

```sh
yarn zxp
```

A versioned .zxp file will be placed inside `archive`.

## Guides

### Running Scripts

1. Add the function to the `$.global` object in `script/index.jsx.ts`
2. Call `evalScript` in your React component

```js
// index.jsx.ts
import { id } from "../shared";
function alertFromScript(message) {
alert(message);
}

$.global[id] = {
alertFromScript,
};

// Component.jsx
import * as React from "react";

export function Component() {
const { evalScript } = useExtension();

return (
evalScript('alertFromScript("Hey!")')}>Alert
);
}
```

### Logging

You can log events from React in a similar way:

```js
// Component.jsx
import * as React from "react";

export function Component() {
const { logMessage } = useLogger();

return (
logMessage("info", "Logged info from panel")}>
Log info

);
}
```

This will append a log message to a file on disk.

### CEP Configuration

See [fusepilot/parcel-plugin-cep](https://github.com/fusepilot/parcel-plugin-cep)