JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q41693F
  • License MIT

CLI for simplifying PICO-8 game development in JavaScript

Package Exports

  • @jspicl/cli/types

Readme

@jspicl/cli

Build PICO-8 games in JavaScript with hot reload, PNG spritesheets, and a streamlined workflow.

Features

  • Hot reload - See changes instantly in PICO-8
  • PNG spritesheets - Use your favorite image editor instead of PICO-8's built-in tools
  • JavaScript transpilation - Write modern JS, output PICO-8 Lua
  • Tree-shaking - Automatic dead code elimination to save tokens

Installation

npm install -D @jspicl/cli

Quick Start

  1. Create a config file:
// jspicl.config.ts
import type {Config} from "@jspicl/cli/types";

const config: Config = {
  spritesheetImagePath: "assets/sprites.png", // 128x128 PNG
  jsOutput: "build/game.js"
};

export default config;
  1. Write your game in JavaScript:
// src/game.js
function _init() {
  x = 64;
  y = 64;
}

function _update() {
  if (btn(0)) x -= 1;
  if (btn(1)) x += 1;
  if (btn(2)) y -= 1;
  if (btn(3)) y += 1;
}

function _draw() {
  cls();
  circfill(x, y, 4, 8);
}
  1. Build and run:
jspicl src/game.js build/game.p8 --config jspicl.config.ts --watch

PICO-8 launches automatically. Edit your code, save, and watch it reload instantly.

Documentation

Visit jspicl.github.io for the full CLI reference, config options, and guides.