1.0.2 • Published 4 years ago

dsa-lexicon v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

@saptaksengupta/lexicon

A cli to help generate template files based on your programming language preference.

Features

  • Ease of Starting: Lexicon cli tool contains a set of starter templates to start with simple coding platform problems.(Hackerrank, leetcode, codeforces etc...)

  • Supported Languages: Current intial version(1.X.X) has JAVA, PYTHON and NODE support only.

Installation

npm i -g @saptaksengupta/lexicon

Usage

After install globally, you can use it by simply doing lexicon

lexicon

By using lexicon command you will be able to see some questions that will be asked to know your preference.

This is how it will look like

 _                     _
 | |       ___  __  __ (_)   ___    ___    _ __
 | |      / _ \ \ \/ / | |  / __|  / _ \  | '_ \
 | |___  |  __/  >  <  | | | (__  | (_) | | | | |
 |_____|  \___| /_/\_\ |_|  \___|  \___/  |_| |_|

? What lanuage do you prefer? (Use arrow keys)
❯ java
  javascript
  python

By Choosing any language of your choice it will ask you the name of your file. if you choose Javascript it will look like something like this

? What lanuage do you prefer? javascript
? What's your file name?

After providing any name of your choice, it will generate the file into the src folder of root directory

Example filename demoJsFileName, it will generate a file inside src/javascript/demoJsFileName.js that will look like

'use strict';

function demoFunction() {
    return "Generated by @saptak/lexicon cli Template generator.";
}

function main() {
    let result = demoFunction();
    console.log(result);
}

main();

** Please Note that if you want any nested directory to be generated, you can do it easily by giving file name as exampleDir/exampleFilename. It will generate the file of you choice inside src/javascript/exampleDir/exampleFilename.js

** For now only single command is supported.

** Command line arguments will be supported in future versions.

Contributions

Any kind of Coding contributions will be highly appriciated. For any issues and bugs please feel free to create an issue. For any feature contributions, feel free to fork and raise a PR.

Author

Saptak Sengupta