acode-pluginx
raw JSON → 1.1.0 verified Fri May 01 auth: no javascript
A CLI starter tool for scaffolding Acode plugins (mobile code editor) with esbuild bundler. Current version 1.1.0. Supports TypeScript and JavaScript project generation, optional SCSS preprocessing, and integration with npm, pnpm, yarn, or bun. Provides pre-configured esbuild config, dev server, and zip packaging. Experimental support for CodeMirror typings. Requires Node.js 18+. Differentiates from generic scaffolding by tailoring output specifically to Acode plugin structure and build pipeline.
Common errors
error Error: Unknown option '--ts' ↓
cause Typo or using an older version of the CLI without that flag.
fix
Update to latest version: npx acode-pluginx@latest
error Error: Must provide projectName and pluginId ↓
cause Missing required positional arguments.
fix
npx acode-pluginx <projectName> <pluginId>
error Error: Cannot find module 'esbuild' ↓
cause esbuild is not installed globally or in the project.
fix
Run 'npm install esbuild' in your project directory before building.
Warnings
gotcha Do not pass both --ts and --js flags together; the CLI will error. ↓
fix Use only one of --ts or --js.
gotcha Experimental --cm-types may generate incomplete or incorrect CodeMirror typings. ↓
fix Use with caution; verify typings or avoid if stability is needed.
breaking The generated esbuild.config.mjs uses ES module syntax; older versions of esbuild may not support it. ↓
fix Ensure esbuild version is 0.19+ or use compatible config.
gotcha If you run 'npx acode-pluginx . com.plugin.acode' in a non-empty directory, you'll get a warning but it will still overwrite files. ↓
fix Run in empty directory or confirm no important files will be overwritten.
Install
npm install acode-pluginx yarn add acode-pluginx pnpm add acode-pluginx Imports
- acode-pluginx wrong
npm install -g acode-pluginx && acode-pluginxcorrectnpx acode-pluginx <projectName> <pluginId> - main.js/main.ts wrong
import acode from 'acode'correctimport { plugin } from 'acode' - esbuild.config.mjs wrong
trying to use require() inside esbuild.config.mjscorrectthe generated config is ESM (.mjs)
Quickstart
npx acode-pluginx samplePlugin com.example.plugin --ts --use-npm --scss
cd samplePlugin
npm install
npm run dev