npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

extendscript-repl

v0.0.4

Published

Read-Eval-Print-Loop (REPL) for ExtendScript

Downloads

4

Readme

Overview

Read-Eval-Print-Loop (REPL) for ExtendScript via Apple Javascript for Automation.

Requirements

  1. macOS supporting JavaScript for Automation
  2. Valid license for Adobe products that use ExtendScript. Currently supports Photoshop, Illustrator and InDesign.
  3. Ruby
  4. Handy ExtendScript reference

Installation

Clone and use directly:

git clone https://github.com/theasci/extendscript-repl
cd extendscript-repl
./run.rb -h

Or, add as development dependency in your package.json file.

"devDependencies": {
  "extendscript-repl": "^0.0.1"
}

Install with npm install. You should now be able to create a script (repl.sh) that loads your bootstrap JSX, if desired.

#!/bin/bash
DIRECTORY=$(cd `dirname $0` && pwd)
"$DIRECTORY/node_modules/extendscript-repl/run.rb" -b "$DIRECTORY/bootstrap.jsx"

run.rb

me@host$ ./run.rb -a photoshop
ExtendScript REPL - photoshop
Type 'help' to get started.
jsx> app.name
Adobe Photoshop
jsx> app.version
21.0.3
jsx> exit

me@host$ ./run.rb -a indesign
ExtendScript REPL - indesign
Type 'help' to get started.
jsx> app.properties.name
Adobe InDesign
jsx> app.properties.version
15.0.1.209
jsx> app.activeDocument.stories[0].texts.firstItem()
Application("Adobe InDesign 2020").documents.byId(510).stories.byId(216)
jsx> app.activeDocument.stories[0].texts.firstItem().toSpecifier()
/document[@id=510]/story[0]/text[@location=first]
jsx> quit

me@host$ ./run.rb -b lib/bootstrap.jsx
jsx> Global.toSource()
({rootPath:new Folder ("~/projects/extendscript-repl")})
jsx> Global.rootPath
Path("/Users/me/projects/extendscript-repl")

Gotchas

  1. Backslashes (\) need to be escaped. jsx> 'test'.match(/\\w/)

NPM Release Tasks

  1. Update package.json version number
  2. npm install to update package lock.
  3. Ensure tests pass: npm test
  4. Update CHANGELOG.md with changes since last release.
  5. Check them all into the repository.
  6. git tag -a <version> -m <version>; git push --tags
  7. npm publish to deploy the release to npm.

TODO

  1. ExtendScript session to handle variables introduced. Not sure how this would be done.
  2. History writes to a file so they exist beyond a single Session
  3. Handle multiline commands