robb-j / nova-doofer

Extra text utilities for Nova

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doofer

Extra text utilities for Nova. This is not currently a published Nova Extension.

A Doofer can be anything. When you can't think of the name of an object or item just replace the unknown name with doofer and hey presto.

Mc Numpty March 20, 2004 [link]

You may want:

Development

This is a Nova extension written in TypeScript which is bundled with esbuild and formatted with Prettier.

These are the production dependencies:

  • casex for converting text between cases
  • yaml for converting between json and yaml

The extension is made up of several "editor" commands which work with the text you have selected in a Nova text editor. The commands are found in the src/Scripts/commands folder and the entrypoint for the extension is src/Scripts/main.ts

Setup

To work on the extension, you will need to have Node.js (version 16+) and Nova installed on your development machine. Then run:

# cd to/this/folder

# Install NPM dependencies
npm install

Next, open this repository (the folder with Doofer.novaextension in it) in Nova and make sure Nova is in development mode, NovaPreferences and check Extension Development.

Regular use

For development, use the Development task to build and run the extension locally. Build will compile the TypeScript into JavaScript into the extension folder. Use Extensions → Activate Project as Extension to run the extension. Nova will run the extension locally and restart when any file inside the .novaextension changes, e.g. by re-running the Build task.

Make sure to disable the extension if a published version is already installed.

When in development mode, the extension outputs extra information to the Debug Pane, which can be shown with ViewShow Debug Pane.

Use the text in the examples markdown files to test different commands.

Code formatting

This repository uses Prettier, yorkie and lint-staged to automatically format code when staging code for a git commit. So code that is pushed to the repository is always consistently formatted.

You can manually run the formatter with npm run format if you want.

Prettier ignores files using .prettierignore or adding // prettier-ignore before a line.

Future work / Ideas

Please see GitHub issues

About

Extra text utilities for Nova

License:MIT License


Languages

Language:JavaScript 91.9%Language:TypeScript 7.9%Language:Shell 0.1%