Tools
- module bundler : creates a single file from multiple files by creating a dependency graph. Most popular are Vite and Webpack
- Transpiler : converts code from other languages to ones browser understands. e.g. Babel
- Task runner: To automate different parts of the build process like testing, linting, compiling etc.
- Version control system : software tool that help track changes to source code over time and revert back when required.
- Git : a distributed version control tool. It records changes in a project as snapshots in a database called repository
- Test runners : tools that execute a pre-defined test script and auto-generate results. e.g. Jest
- Code splitting : practice of breaking up application into smaller pieces that can be loaded on demand.
GIT
- has two main data structures - object store & index, stored in
.git
folder
- Git objects represent a data structure and have a unique hash-id. Types
- Blobs (file structures)
- Trees ( directory structure)
- tree-ish is anything that ultimately leads to a tree object. e.g. branch, tag
- commit-ish (type of tree-ishes) e.g.
HEAD, sha-1 hash
- combined : tree-ish:path e.g.
main:assets/hello.js
- A
branch
is pointer to last commit made on branch. Internally, it's a file that contains sha-1 checksum of last commit
- new
branch
-> new copy
HEAD
is pointer to current local branch ; when it points to a specific commit -> detached
2 ways to integrate branches
- merge : combine end-points and point to it.
- fast-forward: move main branch's tip forward onto feat tip
- 2 parent: new commit is created (merge commit)
- rebase : replay all commits in a particular branch over a different branch