Registry / devops / rollup-plugin-screeps-world

rollup-plugin-screeps-world

JSON →
library1.0.4jsnpmunverified

A Rollup plugin for deploying code to the Screeps MMO game world. Version 1.0.4 is the latest stable release, updated sporadically. It automates uploading compiled JavaScript bundles to Screeps servers via the official API, with support for automatic branch naming from Git, source map uploading, and config file-based authentication. Unlike generic upload plugins, this is purpose-built for Screeps' unique upload protocol and branch system. It ships TypeScript types.

npm install rollup-plugin-screeps-world
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-SCRE
R
rollup-plugin-screeps-world
devopsjavascriptv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import screeps from 'rollup-plugin-screeps-world'
const screeps = require('rollup-plugin-screeps-world')
ESM import required; CommonJS require will not work because the package is ESM-only.
screepsWorld (named)
import { screepsWorld } from 'rollup-plugin-screeps-world'
import screepsWorld from 'rollup-plugin-screeps-world'
The package also exports a named export `screepsWorld` which is identical to default. Prefer default for consistency.
ScreepsPluginOptions (type)
import type { ScreepsPluginOptions } from 'rollup-plugin-screeps-world'
Type import for TypeScript users. Only available in v1+. Not exported from CommonJS.

Shows a minimal Rollup config using TypeScript and the screeps plugin to upload the bundle to Screeps.

import screeps from 'rollup-plugin-screeps-world'; import typescript from '@rollup/plugin-typescript'; export default { input: 'src/main.ts', output: { dir: 'dist', format: 'cjs', entryFileNames: 'main.js', sourcemap: true }, plugins: [ typescript(), screeps({ configFile: './screeps.json', dryRun: false }) ] };
Debug
Known issues
breakingThe plugin is ESM-only from v1.0.0. Using require() will fail.
fix
Use import syntax in your Rollup config and ensure your project uses ESM (type: module in package.json) or use a dynamic import.
affects: >=1.0.0
deprecatedThe option `token` is deprecated since v1.0.3. Use `configFile` or inline `email`/`password`.
fix
Replace `token` with a config file or inline credentials.
affects: >=1.0.3
gotchaIf `sourcemap: true` in Rollup output, the plugin expects source map as a separate file. If not provided, upload will fail silently.
fix
Ensure both output file and .map file are present in the output directory, or set `sourcemap: false`.
affects: >=1.0.0
gotchaThe `branch` option set to `"auto"` relies on git branch name. If not in a git repo, it defaults to undefined, causing upload errors.
fix
Set a static branch name in config, or ensure your project is a git repository.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Unexpected token 'export'
Using CommonJS require() on ESM-only package.
fix
Change to import syntax: `import screeps from 'rollup-plugin-screeps-world'`
TypeError: screeps is not a function
Using default import incorrectly (e.g., `{ screeps }` instead of `screeps`).
fix
Use `import screeps from 'rollup-plugin-screeps-world'`
Error: ENOENT: no such file or directory, open './screeps.json'
The config file path is misconfigured or missing.
fix
Ensure the file exists at the specified path, or provide inline options.
Error: Invalid credentials (401)
Wrong email or password in config file.
fix
Verify credentials in screeps.json or environment variables.
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-screeps-world — npm install rollup-plugin-screeps-world · libregistry