Giter Site home page Giter Site logo

node-cli-csv's Introduction

node-cli-csv

An example project using vite-node and typescript to create a cli tool that ingests csv data and sorts it.

Requirements

This project requires node.js to be installed. This project uses volta to manage node versions.

To install volta run the following command in the terminal.

curl https://get.volta.sh | bash

ESM Node

https://www.typescriptlang.org/docs/handbook/esm-node.html

Install

Build and install the package globally so you have access in your cli terminal.

  1. build npm run build
  2. install npm install -g .

Then test the package is working and installed by calling the package name csv-picker in your terminal.

The run command is csv-picker -p ./src/input.csv -o ./src/output.csv which will create a sorted csv file from an input csv file.

Testing

This project uses vitest for testing.

  1. run the unit tests with npm run test

It's also recommended to install the vitest extension for vscode.

vite-node

When running the npm run dev command you need to prefix any arguments with --

eg npm run dev -- -p ./src/input.csv -o ./src/output.csv

Running the cli

  1. The input path and output path need to be provided
  2. run csv-picker --help for a list of options
  3. run the cli with arguments csv-picker -p ./src/input.csv -o ./src/output.csv to create a sorted csv file from an input csv file.

node-cli-csv's People

Contributors

jdizm avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.