@postxl/lock
v1.5.0
Published
> A simple lock file implementation for PostXL projects.
Downloads
84
Readme
lock
A simple lock file implementation for PostXL projects.
Definitions
We divide files into static
and dynamic
files.
static
files are files that are not bound to data schema (e.g.atoms/Button/Button.tsx
),dynamic
files are files that are bound to data schema and change as the data model changes (e.g.models/User/Form.tsx
).
We further divide static
files into project
files and template
files.
project
files change in each project (e.g.web/package.json
), whiletemplate
files mostly stay unchanged (e.g.atoms/Button/Button.tsx
- we only change them when we fix a bug or add a new feature).
We further divide dynamic
files into managed
and detached
files.
managed
files are files which have the same content as generator would've generated, whiledetached
files are files that user has modified manually.
LockFile
To figure whether user has modified a file, we track checksums of all files in the project.
By convention we store checksums in
postxl-lock.yaml
.
We determine whether the file has been modified by comparing the checksum of the actual file on the disk with the checksum in the lockfile. If the file has been modified, the checksum will be different.