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

extendscriptkit

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extendscriptkit - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

ExtendScriptKit.jsx

2

jsx/ae/Application.js
'use strict';
require('./Project');
Application.prototype.undoable = function (name, cb) {

@@ -4,0 +6,0 @@ app.beginUndoGroup(name);

7

package.json
{
"name": "extendscriptkit",
"version": "0.1.1",
"version": "0.1.2",
"description": "ExtendScript shims and helpers",

@@ -12,2 +12,3 @@ "main": "index.js",

"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0",
"browserify": "^13.1.1"

@@ -17,4 +18,4 @@ },

"test": "echo \"Error: no test specified\" && exit 1",
"build": "rm -rf jsx && rm -rf js && cd src && babel . -x \".jsx\" --out-dir ../jsx && babel . -x \".js\" --out-dir ../js",
"build-docs": "find src -name '*.md' | xargs cat > API.md"
"build": "npm run build-standalone && rm -rf jsx && rm -rf js && cd src/jsx && babel . --out-dir ../../jsx && cd ../js && babel . --out-dir ../../js",
"build-standalone": "browserify -t babelify src/jsx/standalone.js > ExtendScriptKit.jsx"
},

@@ -21,0 +22,0 @@ "author": "Koen Schmeets",

@@ -14,2 +14,4 @@ # ExtendScriptKit

If you don't want to use Browserify, you can download the zip of this repository and use the ExtendScriptKit.jsx bundle (note: untested)
## Features

@@ -44,2 +46,129 @@

[Go to API.md](API.md)
### AE / Application (JSX)
Adds a couple of helper methods to `AE`'s `Application` prototype.
#### Use
Add the following import to your project's `index.jsx` file:
**index.js**
```js
require('extendscriptkit/jsx/ae/Application')
app.undoable('Some Action Description', () => {
// everything you do within here will be undoable
})
app.faster(() => {
// code within here that adds or modifies layers or composition will be faster.
// It adds a temporary composition and focuses it so AE doesn't have to do a lot of re-draws.
// After your code in here has ran, the temporary composition will be removed.
})
```
### AE / Composition (JSX)
Adds a couple of helper methods to `AE`'s `CompItem` prototype.
#### Use
Add the following import to your project's `index.jsx` file:
**index.js**
```js
require('extendscriptkit/jsx/ae/Composition')
app.project.forCompositions(composition => { // see Project API
composition.forLayers(layer => {
// do something with layer
})
composition.forSelectedLayers(selectedLayer => {
// do something with selected layer
})
})
```
### AE / Project (JSX)
Adds a couple of helper methods to `AE`'s `Project` prototype.
#### Use
Add the following import to your project's `index.jsx` file:
**index.js**
```js
require('extendscriptkit/jsx/ae/Project')
app.project.forItems(item => {
// do something with item
})
app.project.forFilteredItems(
item => item.name === 'Test',
item => {
// do something with item named 'Test'
}
)
app.project.forSelections(selection => {
// do something with selection
})
app.project.forCompositions(composition => {
// do something with composition
})
app.project.forCompositionsWithName('compy', (composition) => {
// do something with compositions named 'compy'
})
```
### Bridge (JS / JSX)
The bridge allows communication between JS and JSX.
On the JSX end it exposes a dispatch(type, data) method and
On the JS end it exposes the CSInterface.
#### Use
Add the following imports to your project's `index.js` and `index.jsx` file:
**index.js**
```js
const bridge = require('extendscriptkit/js/bridge')
bridge.addEventListener('MY_EVENT', data => {
console.log(data)
})
```
**index.jsx**
```js
const dispatch = require('extendscriptkit/jsx/bridge')
dispatch('MY_EVENT', 'Hello World')
```
### Console (JS / JSX)
Shims the console in JSX files.
The `console.log`'s will go to the remote chrome debugger, ExtendScript Toolkit and
the debug log file.
Additionally, `console.error`'s will be written to panel's <body> as well.
#### Use
Add the following imports to your project's `index.js` and `index.jsx` file:
**index.js**
```js
const bridge = require('extendscriptkit/js/bridge')
require('extendscriptkit/js/console')(bridge)
```
**index.jsx**
```js
require('extendscriptkit/jsx/console')
```
You can now use `console.log()` and `console.error()` in any JSX file.
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