React/Redux Flashcards
What is Node.js ?
framework to run js files server side / in your terminal
What is oh-my-zsh?
framework for your zsh shell. This tool is configured thanks to the ~/.zshrc file. Go ahead and have a look at it:
cat ~/.zshrc
What is yarn?
Yarn is the new dependency management tool you can use with NPM packages. It’s a replacement over the npm command line which comes by default with Node.js.
What is $PATH?
Basically, it’s a list of folders where your operating system look when you type a command. When you type ls, the OS will look in the $PATH and see that /bin is in there. And /bin/ls exists! So it will run /bin/ls. That means that ls is just a shortcut for typing the whole path /bin/ls.
How do you access the JS console in your terminal?
node
What is the js package manager?
yarn
Which file do you put your js libraries and dependencies?
package.json
What is the tool to identify syntax problems in your js code?
Eslint
What is the test framework for js?
Jest (like Rspec for Ruby)
What is Babel?
ES6 is only available in 95% of browsers. For the other 5%, Babel will compile our ES6 code into ES5, the previous version of JavaScript.
Elements of a webpack boilerplate?
Initalize Yarn
ESlint
Webpack
Babel
yarn init (package.json file)
ESlint
yarn add eslint –dev
eslint –init # Use Airbnb, no react (yet). Store as json
rm package-lock.json # we already have yarn.lock
eslint src/index.js
Webpack
yarn add webpack webpack-cli webpack-dev-server –dev
Configure Webpack
touch index.html
touch webpack.config.js
launch the dev server with:
webpack-dev-server
Babel
yarn add @babel/core @babel/preset-env –dev
# Create a Babel config file with:
echo ‘{ “presets”: [“@babel/preset-env”] }’ > .babelrc
# For webpack
yarn add babel-loader –dev