Code Monkey home page Code Monkey logo

greencoppercmd's Introduction

GreenCopperCmd

The green_copper_cmd project is a commandline JavaScript interpreter which uses the GreenCopperRuntime which is in turn based on quickjs.

For a list of features that work in script here you should check out the GreenCopperRuntime project.

TypeScript

Supports typescript, you can run .ts files or use .ts modules

ifdef and env vars

You can use ifdef and env vars like this

#ifdef $GRECO_TEST
   console.log("test mode active") 
#endif
#ifdef $GRECO_RELEASE
   console.log("release mode active") 
#endif
console.log("path = $PATH");

Modules and fetch api

Loading modules from https locations and the fetch api are enabled by default.

Getting started on Raspberry PI with GPIO

I use this project a lot for GPIO stuff on my Raspberry Pi powered robots, if you connect a Led to GPIO pin 20 this little test should make it blink twice

NB: This project only works on a 64 bit OS!

git clone https://github.com/HiRoFa/GreenCopperCmd
cd GreenCopperCmd
cargo run -- -f scripts/test_led.ts -i 

commandline options

running with a script

greco test.ts

continue running after script has completed (interactive mode)

greco -i test.ts

or without using a file

greco -i'

verbose mode

greco -v'

greencoppercmd's People

Contributors

andrieshiemstra avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.