JaSkIt
Java-Script-Interface for CLI
Node module as an object factory. Use it to ask in CLI and write the user's answers into a file. More or less, as npm init command.
Install
$ npm install jaskit
Usage
var color='red';//'blue', 'green', etc., /*You also can use your own chalk color *combinations to give it more style *as *var chalk=require('chalk'); *var color=chalk.bgGreen; */ var jaskit= ;var cli= ; //display some message before start questions jaskit; jaskit; jaskit; jaskit;
Mix It!
Use it alone or with your favorite CLI, like commander.
program description'Ask some cuestions and write them on a file' action{ //body... jaskit; jaskit; jaskit; jaskit; jaskit; };
Change format!
Change the user response with a JavaScript object and regular expressions.
Format object
before property -- Add something before the user's answer.
replace property -- Regular expression to match with the user'
put property -- the text or characthers to put in place.
after proprety -- Add something after the user's answer.
var formatFor1=before: "" replace:/fine/ put:"Ok" after:""; cli; cli; cli; cli; //params(questionID, formatObjct) cli; cli; cli;
License
MIT © Lucas_C/llucbrell