Command Line Programming Flashcards
What is a CLI?
Command Line Interface
What is a GUI?
Graphical User Interface
Give at least one use case for each of the commands listed in this exercise. man cat ls pwd echo touch mkdir mv rm cp
Man - opens manual for command Cat - to see the contents of a file Ls - lists contents of directories Pwd - shows present working directory Echo - displays line of text (terminal console log) Touch - changes the files time stamps Mkdir - makes a directory Mv - to rename a directory or move things Rm - remove files or directories Cp - to copy
What are the three virtues of a great programmer?
Laziness, Impatience, Hubris
What is Webpack?
A dev dependency that allows you to bundle your JavaScript files
How do you add a devDependency to a package?
Npm install —save-dev “package”
What is an NPM script?
A CLI shortcut for a program to run.
How do you execute Webpack with npm run?
Npm run keyword
What is NPM?
- The worlds largest software registry
- Open source program for coders to share code
- CLI
- The registry
- The website
What is a package?
A directory with files and package.json
How can you create a package.json with npm?
With npm init —yes command
What is a dependency and how do you add one to a package?
Dependencies are other packages that your package relies on, you can add one with the npm install command
What happens when you add a dependency to a package with npm?
It adds it to the JSON file and creates a node_modules directory
What is the difference between a dependency and a devDependency?
dependencies are for production, devDependencies are for development and to build/code check