jspicl / jspicl-cli Goto Github PK
View Code? Open in Web Editor NEWCLI for simplifying PICO-8 game development in JavaScript
License: MIT License
CLI for simplifying PICO-8 game development in JavaScript
License: MIT License
Describe the bug
A clear and concise description of what the bug is.
When attempting to run the cli, it crashes instead.
Expected behavior
A clear and concise description of what you expected to happen.
The cli should be able to run.
To Reproduce
Steps to reproduce the behavior.
Clone this repo. Install dependencies using npm install
.
Try to run the cli using bin/cli
or node bin/cli
.
For completeness, here is my environment:
Screenshots
If applicable, add screenshots to help explain your problem.
~/tmp/jspicl-cli$ bin/cli
(node:36493) ExperimentalWarning: The ESM module loader is experimental.
internal/process/esm_loader.js:90
internalBinding('errors').triggerUncaughtException(
^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /home/joeja/tmp/jspicl-cli/bin/cli
at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:65:15)
at Loader.getFormat (internal/modules/esm/loader.js:116:42)
at Loader.getModuleJob (internal/modules/esm/loader.js:247:31)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Loader.import (internal/modules/esm/loader.js:181:17)
at async Object.loadESM (internal/process/esm_loader.js:84:5) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Additional context
Add any other context about the problem here.
I think this is because of "type": "module"
in package.json
. If I understand correctly, "type": "module"
allows you to use ES6 modules in node instead of CommonJS. However, bin/cli
appears to be a CommonJS module, not an ES6 module. Removing this line from package.json
causes the script to give an expected output:
~/tmp/jspicl-cli$ bin/cli
Options:
--input Path to entry point [required]
--output Path the generated PICO-8 cardridge [required]
--spritesheetImagePath Path to a spritesheet [required]
--cartridgePath Path to existing cardridge [required]
--includeBanner Include jspicl info in code
--jsOutput Path to JavaScript output
--luaOutput Path to LUA output
--showStats Display build stats
--pipeOutputToConsole Output console.log to terminal
--reloadOnSave Re-run cartridge when updated
--polyfillTransform Path to a module that exports a transformation method
--customPicoPath Path to PICO-8 executable
--prettify Format LUA code
--watch Reload cartridge on rebuilds
Missing required arguments: input, output, spritesheetImagePath, cartridgePath
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.