5.1.0 • Published 5 years ago

rollup-plugin-jspicl v5.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

Related projects

jspicl - A Javascript to PICO-8 Lua transpiler

games - Games created with 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
    })
  ]
})

Options

PropertyTypeDefaultDescription
cartridgePathstringPath to an existing cartridge to load map, music and sfx from. Ideally this should point to the generated cartridge so you can edit the assets directly. This setting however gives you the option to use a separate cartridge as the source for your assets. MANDATORY
includeBannerbooltrueAdds a comment at the very top of the generated bundle with jspicl info.
jsOutputstringOutput generated javascript code to a file. Useful for debugging when used in combination with astexplorer.
luaOutputstringOutput generated lua code to a file.
polyfillTransformpolyfills => stringundefinedCallback method for modifying the polyfills that are needed. An object hashmap will be passed in where the keys represent the function names and values the lua code. You may replace the existing polyfills with your own versions or even add additional ones.
showStatsbooltrueDisplay useful stats about the generated cartridge
spritesheetImagePathstringPath to a png image to be used as the spritesheet. Colors will be downsampled and mapped against PICO-8's fixed palette using a distance based approach. Using colors close to PICO-8's palette will yield best results. MANDATORY
picoobjectPICO-8 specific options. Default options will be used if not supplied. See table below for details.
jspiclobjectOptions to pass into jspicl. Default options will be used if not supplied. See repo for detailed info.

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 that launched PICO-8.
reloadOnSavebooltrueAutomatically reload the cart when source files have been modified.

Versioning

This project uses semantic versioning

5.1.0

5 years ago

5.0.3

6 years ago

5.0.2

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.7.0

6 years ago

4.6.3

6 years ago

4.6.2

6 years ago

4.6.1

6 years ago

4.6.0

6 years ago

4.5.0

6 years ago

4.4.1

6 years ago

4.4.0

6 years ago

4.3.1

6 years ago

4.3.0

6 years ago

4.2.0

6 years ago

4.1.2

6 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.0.5

6 years ago

4.0.4

6 years ago

4.0.3

6 years ago

4.0.2

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.8

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago