@content-collections/cli 0.1.1 → 0.1.3

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/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@content-collections/cli",
3
3
  "description": "Command line interface for content-collections",
4
- "version": "0.1.0",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
7
7
  "files": [
@@ -13,20 +13,18 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "tsc",
16
- "start": "tsx src/index.ts",
17
- "prepack": "cp ../../README.md ./README.md",
18
- "postpack": "rm -f ./README.md"
16
+ "start": "tsx src/index.ts"
19
17
  },
20
18
  "dependencies": {
21
19
  "@content-collections/integrations": "workspace:*",
22
- "clerc": "^0.42.2"
20
+ "clerc": "^0.44.0"
23
21
  },
24
22
  "devDependencies": {
25
23
  "@content-collections/core": "workspace:*",
26
- "@types/node": "^20.9.0",
27
- "tsup": "^7.2.0",
24
+ "@types/node": "^20.14.9",
25
+ "tsup": "^8.0.2",
28
26
  "tsx": "^4.1.1",
29
- "typescript": "^5.3.2"
27
+ "typescript": "^5.5.4"
30
28
  },
31
29
  "peerDependencies": {
32
30
  "@content-collections/core": "0.x"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@content-collections/cli",
3
3
  "description": "Command line interface for content-collections",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
7
7
  "files": [
@@ -12,18 +12,18 @@
12
12
  "content-collections": "dist/src/index.js"
13
13
  },
14
14
  "dependencies": {
15
- "clerc": "^0.42.2",
16
- "@content-collections/integrations": "0.1.0"
15
+ "clerc": "^0.44.0",
16
+ "@content-collections/integrations": "0.2.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^20.9.0",
20
- "tsup": "^7.2.0",
19
+ "@types/node": "^20.14.9",
20
+ "tsup": "^8.0.2",
21
21
  "tsx": "^4.1.1",
22
- "typescript": "^5.3.2",
23
- "@content-collections/core": "0.1.1"
22
+ "typescript": "^5.5.4",
23
+ "@content-collections/core": "0.7.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "@content-collections/core": "0.1.1"
26
+ "@content-collections/core": "0.x"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "tsc",
package/README.md DELETED
@@ -1,115 +0,0 @@
1
- # Content Collections
2
-
3
- <a href="https://content-collections.dev">
4
- <img align="left" width="96" height="96" src="https://github.com/sdorra/content-collections/blob/main/website/assets/logo_96x96.png?raw=true" alt="logo: A staple of books">
5
- </a>
6
-
7
- Transform your content into type-safe data collections. Eliminate the need for manual data fetching and parsing. Simply import your content and begin. Built-in validation ensures the accuracy of your data. Preprocess your data before it enters your app.
8
-
9
- ## Features
10
-
11
- - **Beautiful DX**:
12
- Content Collections is designed to provide a pleasurable user experience. It offers a seamless developer experience without the need to restart the server or refresh the browser. Content collections are automatically updated when you make changes to your content.
13
-
14
- - **Type-safe**:
15
- Your content is parsed and validated during the build process, guaranteeing accuracy and currency. Content Collections offers a type-safe API to access your content.
16
-
17
- - **Simple to use**:
18
- No need to manually fetch and parse your content anymore. Just import it and start using Content Collections. It provides a simple API, allowing you to concentrate on building your app.
19
-
20
- - **Tansformation**:
21
- Content Collections allows you to transform your content before it enters your app. You can use it to modify your content, join two collections or even fetch data from a server.
22
-
23
- ## Installation
24
-
25
- 1. Install required packages:
26
-
27
- ```bash
28
- pnpm add -D @content-collections/core @content-collections/cli concurrently
29
- ```
30
-
31
- 1. Add path alias to your `tsconfig.json`:
32
-
33
- ```json
34
- {
35
- "compilerOptions": {
36
- // ...
37
- "paths": {
38
- "content-collections": ["./.content-collections/generated"]
39
- }
40
- }
41
- }
42
- ```
43
-
44
- 1. Update your scripts in `package.json`:
45
-
46
- ```json
47
- {
48
- "scripts": {
49
- "dev": "concurrently 'content-collections watch' 'build-scripts dev'",
50
- "build": "content-collections build && build-scripts build"
51
- }
52
- }
53
- ```
54
-
55
- ## Usage
56
-
57
- 1. Create a content-collections.ts file at the root of your project:
58
-
59
- ```ts
60
- import { defineCollection, defineConfig } from "@content-collections/core";
61
-
62
- const posts = defineCollection({
63
- name: "posts",
64
- directory: "src/posts",
65
- include: "**/*.md",
66
- schema: (z) => ({
67
- title: z.string(),
68
- summary: z.string(),
69
- }),
70
- });
71
-
72
- export default defineConfig({
73
- collections: [posts],
74
- });
75
- ```
76
-
77
- 1. Start writing content in `src/posts`:
78
-
79
- ```md
80
- ---
81
- title: Hello World
82
- summary: This is my first post
83
- ---
84
-
85
- # Hello World
86
-
87
- This is my first post.
88
- ```
89
-
90
- 1. Use your content in your app:
91
-
92
- ```tsx
93
- import { allPosts } from "content-collections";
94
-
95
- export function Posts() {
96
- return (
97
- <ul>
98
- {allPosts.map((post) => (
99
- <li key={post._meta.path}>
100
- <a href={`/posts/${post._meta.path}`}>
101
- <h3>{post.title}</h3>
102
- <p>{post.summary}</p>
103
- </a>
104
- </li>
105
- ))}
106
- </ul>
107
- );
108
- }
109
- ```
110
-
111
- For a more detailed guide, please refer to the [documentation](https://content-collections.dev/docs/guides/getting-started).
112
-
113
- ## License
114
-
115
- Content Collections is licensed under the [MIT License](./LICENSE).