1.0.0 • Published 9 months ago

file-n-functions v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

file-n-functions

A command-line interface (CLI) app for quickly generating a file and declaring functions.

Installation

You can install file-n-functions globally to access it from anywhere in your terminal, or locally to use it within a specific project.

# Global installation
npm install -g file-n-functions

# Local installation (within a project)
npm install file-n-functions

Usage

# Run with the "fnf" command.
fnf

# You will get a prompt for creating a file and declaring functions

# First word will be the filename and the rest of words function names 
# For file names it accepts .ts, .tsx, .js, .jsx.
# If extension is not added, defaulted to .js file.
# If file doesn't exist, it will create one.

Create file and functions: myFile.ts helloWorld foo bar

# Output:
Declared helloWorld() helloWorld in myFle.js.
Declared foo() foo in myFile.js.
Declared bar bar in myFile.js.

Result

//myFile.ts
function helloWorld() {
    //TODO: Write function
}

function foo() {
    //TODO: Write function
}

function bar() {
    //TODO: Write function
}

Requirement

  • Node.js
  • npm

Licence

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Feel free to open issues and submit pull requests.

Project link

https://github.com/moeabdulnas/file-n-functions

1.0.0

9 months ago

0.0.2

9 months ago

0.0.122

9 months ago

0.0.121

9 months ago

0.0.12

9 months ago

0.0.1

9 months ago