Socket
Book a DemoInstallSign in
Socket

rsc

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsc

Run dynamic scripts with node

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
16
220%
Maintainers
1
Weekly downloads
 
Created
Source

rsc

summary

Run scripts from node like cmd alias using rsc

installation

It needs to be installed globally: npm install rsc -g

why

rsc can run scripts dynamically from javascript functions

usage

Create rsc.config.js file in your directory. Example:

module.exports = {
    "demo": "echo 'hello world'",
    "hello": function(name){
        return "echo hello " + name;
    },
    "push": function(message){
        return "git add --all &&  git commit -m '" + message + "' && git push"
    },
    "search": function(toSearch){
        return "find . | grep " + toSearch;
    },
    "bye": {
        "command": "echo bye",
        "description": "Say bye"
    },
}

Call your scripts with rsc {script name} [parameters] Examples:

rsc bye
rsc hello david
rsc push 'initial commit'

Also can call npm scripts (rsc.config.js has priority)

package.json:

...
"scripts" :{
    "server": "node server.js"
}
...

rsc server

list

list is a reserved word that display list of scripts in rs.config and package.json

rsc list:

- demo
- hello
- push
- search
- bye: Say bye
- server

If script is object with description will see in list

Keywords

cmd

FAQs

Package last updated on 20 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts