@dotgithub/core 0.1.4 → 0.1.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @dotgithub/core
2
2
 
3
+ ## 0.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#22](https://github.com/azwebmaster/dotgithub/pull/22) [`e7810e8`](https://github.com/azwebmaster/dotgithub/commit/e7810e82892171041a81938b3d4d2dc7b21dbfab) Thanks [@danbot315](https://github.com/danbot315)! - Improve npm package documentation for both core and CLI with clearer usage examples, command flows, and direct documentation links.
8
+
3
9
  ## 0.1.4
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # @dotgithub/core
2
2
 
3
- Core library for DotGitHub: type-safe constructs and workflow generation utilities.
3
+ Type-safe TypeScript library for defining and generating GitHub Actions workflows using DotGitHub constructs.
4
+
5
+ ## What this package is
6
+
7
+ `@dotgithub/core` is the programmatic engine behind DotGitHub. It provides:
8
+
9
+ - strongly typed workflow models
10
+ - construct primitives for jobs/workflows/shared workflows
11
+ - generation/synthesis helpers for writing `.github/workflows/*.yml`
12
+
13
+ If you want to author reusable CI/CD logic in TypeScript (instead of hand-writing YAML), this is the package you use.
4
14
 
5
15
  ## Install
6
16
 
@@ -8,7 +18,42 @@ Core library for DotGitHub: type-safe constructs and workflow generation utiliti
8
18
  npm install @dotgithub/core
9
19
  ```
10
20
 
21
+ ## Quick example
22
+
23
+ ```ts
24
+ import { createWorkflow } from '@dotgithub/core';
25
+
26
+ const workflow = createWorkflow({
27
+ on: {
28
+ push: { branches: ['main'] },
29
+ },
30
+ jobs: {
31
+ test: {
32
+ 'runs-on': 'ubuntu-latest',
33
+ steps: [
34
+ { uses: 'actions/checkout@v4' },
35
+ { run: 'npm ci' },
36
+ { run: 'npm test' },
37
+ ],
38
+ },
39
+ },
40
+ });
41
+
42
+ // synthesize with your DotGitHub pipeline
43
+ ```
44
+
45
+ ## When to use `@dotgithub/core` vs `@dotgithub/cli`
46
+
47
+ - Use **`@dotgithub/core`** for library/SDK style usage in code.
48
+ - Use **`@dotgithub/cli`** when you want command-driven setup and synthesis.
49
+
11
50
  ## Docs
12
51
 
13
- - <https://github.com/azwebmaster/dotgithub#readme>
14
- - <https://github.com/azwebmaster/dotgithub/tree/main/docs>
52
+ - Main docs: <https://github.com/azwebmaster/dotgithub#readme>
53
+ - Guides: <https://github.com/azwebmaster/dotgithub/tree/main/docs>
54
+ - API/reference context: <https://github.com/azwebmaster/dotgithub/tree/main/packages/core>
55
+
56
+ ## Repository
57
+
58
+ - Source: <https://github.com/azwebmaster/dotgithub>
59
+ - Issues: <https://github.com/azwebmaster/dotgithub/issues>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotgithub/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Core package for @dotgithub monorepo.",
6
6
  "main": "dist/index.js",