Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelcardenasg23/ls-command
This Node.js script tries to replicate the ls terminal command. Provides a basic file listing of a specified directory.
https://github.com/samuelcardenasg23/ls-command
javascript nodejs
Last synced: 7 days ago
JSON representation
This Node.js script tries to replicate the ls terminal command. Provides a basic file listing of a specified directory.
- Host: GitHub
- URL: https://github.com/samuelcardenasg23/ls-command
- Owner: samuelcardenasg23
- Created: 2024-02-03T07:31:45.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-02-05T15:10:19.000Z (9 months ago)
- Last Synced: 2024-02-06T16:09:56.384Z (9 months ago)
- Topics: javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Node.js File Explorer
This Node.js script tries to replicate the **ls** terminal command. Provides a basic file listing of a specified directory. It uses the `fs/promises` module for file system operations and `picocolors` for colorful console output.
## Usage
Make sure you have Node.js installed. You can run the script by providing the target directory as a command-line argument. (Clone the project in a directory that has multiple files or folders):
```bash
node index.js [directory]
```## Overview
![overview](https://github.com/samuelcardenasg23/ls-command/assets/119268082/86f74489-83d2-4ebc-be1c-21a6c4bf4c27)## Installation
1. Clone the repository:```bash
git clone https://github.com/samuelcardenasg23/ls-command
```
2. Install dependencies:
```bash
npm install
```
3. Execute the script by running:
```bash
node index.js [directory]
```## Dependencies
- node:fs/promises - Promisified version of the Node.js fs module.
- node:path - Provides utilities for working with file and directory paths.
- picocolors - A lightweight and efficient library for colored console output.