@elek-io/core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/index.cjs +122 -274
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -99
- package/dist/index.d.ts +5 -99
- package/dist/index.js +105 -272
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -27,10 +27,12 @@ Handles core functionality of elek.io Projects like file IO and version control.
|
|
|
27
27
|
## The concept behind Projects, Collections, Entries, Values and Assets
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
|-- Project
|
|
31
|
-
| |-- Collection
|
|
32
|
-
| | |-- Entry
|
|
33
|
-
| | | |-- Value
|
|
30
|
+
|-- Project - e.g. "Website"
|
|
31
|
+
| |-- Collection - e.g. "Blog"
|
|
32
|
+
| | |-- Entry - e.g "Post"
|
|
33
|
+
| | | |-- Value - e.g for a post's title: "Quarterly results 7% higher than expected"
|
|
34
|
+
| | | |-- Asset - a reference to a previously added Asset like image, PDF or ZIP
|
|
35
|
+
| | | |-- Entry - a reference to another Entry e.g. to show the user related posts
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
### Projects
|
|
@@ -42,21 +44,21 @@ Are a container for Collections, Entries, Values and Assets. Think of a folder c
|
|
|
42
44
|
Contains ValueDefinitions (a schema) for possible Values each Entry can or has to have.
|
|
43
45
|
e.g. for a Blog, it could have the following definition for each post / Entry:
|
|
44
46
|
|
|
45
|
-
- an image that is displayed on top of the post
|
|
46
|
-
- a title to catch users attention
|
|
47
|
-
- content that contains multiple headlines and paragraphs
|
|
48
|
-
- an author that wrote the post
|
|
47
|
+
- an image that is displayed on top of the post (Asset reference)
|
|
48
|
+
- a title to catch users attention (Value)
|
|
49
|
+
- content that contains multiple headlines and paragraphs (Value)
|
|
50
|
+
- an author that wrote the post (Entry reference)
|
|
49
51
|
|
|
50
52
|
Each definition like the title, contains additional information for the input field, that is used to modify it's Value.
|
|
51
53
|
e.g. the title would be a simple one line input field, that has a maximum lenght of 150 characters and is required for each post. But the content is a markdown editor to easily add formatting. The image let's the user select a jpeg or png from disk. And the author is a reference to another Collection's Entry, so the user is able to choose one of them.
|
|
52
54
|
|
|
53
55
|
### Entries
|
|
54
56
|
|
|
55
|
-
Contains
|
|
57
|
+
Contains Values and references that follow the Collection's ValueDefinitions. Why references and not the Assets or Entries itself? To make Values reusable for different Entries and even Collections - so when you update an Asset or Entry, it updates everywhere you've referenced it.
|
|
56
58
|
|
|
57
59
|
### Values
|
|
58
60
|
|
|
59
|
-
Represent a single piece of data like the string "How to be successfull in 3 easy steps", a number or a boolean.
|
|
61
|
+
Represent either a single piece of data like the string "How to be successfull in 3 easy steps", a number or a boolean - or a reference to Assets or other Entries.
|
|
60
62
|
|
|
61
63
|
### Assets
|
|
62
64
|
|