Socket
Socket
Sign inDemoInstall

rollup-plugin-jspicl

Package Overview
Dependencies
194
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rollup-plugin-jspicl

Rollup plugin for generating PICO 8 cartridges. Transpiles javascript into PICO-8 lua code.


Version published
Maintainers
1
Install size
9.44 MB
Created

Changelog

Source

Version 4.3.1

2018-02-14

  • Upgraded to jspicl@1.4.2

Readme

Source

rollup-plugin-jspicl

This plugin uses jspicl to convert your JavaScript into a PICO-8 cartridge with lua code.

Installation

npm install rollup-plugin-jspicl --save-dev

jspicl - A Javascript to PICO-8 Lua transpiler

jspicl-mario-sample - Mario sample game using jspicl and rollup-plugin-jspicl

Usage

import jspicl from "rollup-plugin-jspicl";

export default {
  input: "src/game.js",
  output: {
    file: "build/game.p8",
    format: "es"
  },
  plugins: [
    buble(),
    jspicl()
  ]
})

Options

PropertyTypeDefaultDescription
cartridgePathstringPath to cartridge to load sprites, map, music and sfx from. Ideally this should point to the generated cartridge so you can edit the assets directly. However, this setting gives you the option to use a separate cartridge as the source for your assets.
includeBannerbooltrueAdds a comment at the very top of the generated bundle with jspicl info.
jsOutputstringOutput generated javascript code to a file. Useful for debugging if used in combination with astexplorer.
luaOutputstringOutput generated lua code to a file.
showStatsbooltrueDisplay useful stats about the generated cartridge
picoobjectPICO-8 specific options. See table below for details.

PICO-8 Options

PropertyTypeDefaultDescription
autoRunbooltrueStart up PICO-8 when starting the build with npm start
customPicoPathstringPath to PICO-8. If not specified the default path will be used.
pipeOutputToConsoleboolfalseWhen true, will output console.log calls to terminal.
reloadOnSavebooltrueAutomatically reload the cart when saving.

Versioning

This project uses semantic versioning

License

MIT

FAQs

Last updated on 14 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc