spiky-cli
v0.1.2
Published
This is the spiky-cli package. A package that can transpile spiky.js code into Python code with can be run on the SPIKE Prime Robot.
Maintainers
Readme
spiky-cli
Transpile TypeScript spiky.js blocks to working python code that can be executed on a Spike Prime Robot.
Installation
Install spiky-cli with npm or yarn
npm install spiky-cli --save yarn add spiky-clior instantly run it using npx
npx spiky-cli initCommands
init
spiky-cli initInitialize a new config.spiky.json file thats configures the build command.
| Option | Description |
| :-------- | :------------------------- |
| -y | Optional. Skips the prompts and uses the default values |
build
spiky-cli buildTranspile your TypeScript spiky.js blocks into python code. Uses the config file for export options.
| Parameter | Description |
| :--------| :-------------------------------- |
| --overwrite | Optional. Enables instant overwriting |
| --keeplines | Optional. Keeps the lines of your spiky.js code. |
version
spiky-cli versionLogs the current version
update
spiky-cli updateUpdates the spiky-cli and spiky.js to the newest available version.
help
spiky-cli helpLogs out a help form.
Types
SpikyConfig
Layout of the config.spiky.json file.
| Property | Type | Description |
| :--------| :------- | :-------------------------------- |
| inputFileName | string | Required. The name of the input file in which you use the spiky.js blocks |
| export | object | Required. An object that sets different export settings. |
export
type="python"
| Property | Type | Description |
| :--------| :------- | :-------------------------------- |
| type | python or project | Required. |
| formatOutput | boolean | Required. Enable format settings |
| formatterSettings | boolean | Optional. Only available if formatOutput=true. For options: check here |
type="project"
| Property | Type | Description |
| :--------| :------- | :-------------------------------- |
| type | python or project | Required. |
| folderName | string | Required. The path to the folder that holds your existing project. If this path is not reachable, a new folder with projectbody.json will be created. |
FAQ
Is this package made, maintained or managed by Lego or any associated company?
No, this project is not handled by Lego in any way.
Developers
Contributing
Contributions are always welcome!
See contributing.md for ways to get started.
Please adhere to this project's code of conduct.
