Vue.js Flashcards
Vue
A progressive framework for building user interfaces, that is designed to be incrementally adoptable.
Vue is a non-opinionated interface and can be easily integrated into other libraries and frameworks.
Progressive framework
Implementing by extending HTML with new tags or attributes
Single Page Application
Serves a single HTML page and all other “pages” in the site are generated using DOM manipulation of the original HTML with new data retrieved from web API using JavaScript.
Parts of a Vue Project Folders
- node_modules
- public
- src
Parts of a Vue Project - Non-Folders
- .gitignore
- babel.config.js
- package-lock.json
- package.json
- README.md: default readme file
Node_modules
JavaScript libraries required to run our project and the current Toolchain
Similar to Maven’s .m2 folder in Java, but per project instead of global
Created when “npm install” is run for a project
Public
Initial HTML file and other static files
Src
Vue Source Code - where most vue application development is done
sub-folders
assets - images, css, reusable js scripts, etc.
components - vue components (.vue files)
App.vue - starting component. A place to add global components like a Header or Footer.
The starting component does not need to be App.vue, but it is in the default project.
main.js - Single Vue instance that starts Vue running and loads the initially components (main method)
.gitignore
sensible defaults for .gitignore
babel.config.js
babel configuration, compiles languages to JS
package-lock.json
It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.
package.json
The NPM package meta file that contains all the build dependencies and build commands
Toolchain
NPM
ESLint
Babel - JavaScript compiler and Transpiler that provides Polyfill
NPM
Node Package Manager : manages dependencies and builds (like maven did for Java). https://docs.npmjs.com/about-npm/
ESLint
static code analysis that finds problematic coding patterns and enforces coding styles https://eslint.org/docs/about/