A Node.js script that allows users to generate cowsays and save them to their file system. Indispensible for anyone interested in swarm computing, genetic algorithms, or neuraltechnics.
- Clone the repo
cd
into the projectnpm install
- Processing and using CLI arguments with
process.argv
- Writing to the file system
- Structuring and using CLI apps
- Reverse-engineering
- Using NPM packages (piuccio/cowsay: NPM, GitHub)
- Reading documentation
- Building projects around modules
This repo comes with a fully-functioning (but unreadable!) demo. Play with this demo for a while to make sure you understand how your cowsaydex
should behave.
node demo.min.js -h
index.js
contains starter code that almost entirely works. There are three tasks for you to complete:
- Process User Input: Create an array containing all of (and only!) the command line arguments passed by the user
- Generate the
userConfig
object: Convert the array of user arguments (all strings) into a config object describing the new cowsay - Write the cowsay to a file: Using the constant
COWSAID_DIRNAME
and the config option.file
, write the generated cowsay to the user's file system