Code Monkey home page Code Monkey logo

jssh's Introduction

jssh

jssh(javascript shell) is a command which can run javascript in shell. This is very usefull sometimes. Like you are newer to javascript, you can directly run javascript sample in shell.

Depend

This tool depend on java. So you need install java first.

  1. goto http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. download sdk

Install

  1. Online
curl https://raw.githubusercontent.com/smallmuou/jssh/master/online-install.sh|sudo /bin/bash

source ~/.bash_profile
  1. Manual
git clone https://github.com/smallmuou/jssh
cd jssh
sudo bash setup.sh install

Uninstall

sudo bash setup.sh uninstall

Usage

the sample.js like follow.

print("Hello jssh");

print("arg0 = " + $0);
print("arg1 = " + $1);
print("arg2 = " + $2);
print("arg length = " + $n);

and run follow command:

jssh sample.js 123 345

and the output is:

Hello jssh
arg0 = sample.js
arg1 = 123
arg2 = 345
arg length = 3
  • Comment
    • arg must be less than 9.
    • $0 - the name of js file
    • $1 - arg1
    • $2 - arg2
    • $3 - arg3
    • $4 - arg4
    • $5 - arg5
    • $6 - arg6
    • $7 - arg7
    • $8 - arg8
    • $9 - arg9
    • $n - arg length

History

  • 1.1.0
    • Support argument
  • 1.0.0
    • Support run javascript in shell
    • Support Linux and Darwin

License

This tool follows MIT License.

Contact

[email protected]

jssh's People

Contributors

smallmuou avatar

Stargazers

 avatar

Watchers

James Cloos 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.