@natjswenson/devlog 0.1.0 → 0.1.2
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 +3 -1
- package/bin/devlog.js +3 -2
- package/config.example.json +2 -0
- package/package.json +1 -1
- package/preview/vite.config.js +7 -0
package/README.md
CHANGED
|
@@ -142,10 +142,12 @@ That's the entire contract.
|
|
|
142
142
|
| Field | Type | Description |
|
|
143
143
|
|---|---|---|
|
|
144
144
|
| `targetRepo` | `"<owner>/<repo>"` | Repo where dev log entries are published. **You create this — `init` does it for you, or `gh repo create` manually.** |
|
|
145
|
+
| `branch` | string (optional) | Branch in the dev-log repo. Defaults to `main`. |
|
|
145
146
|
| `gitAuthor` | string | Used as `git log --author=...` to find your commits. |
|
|
146
147
|
| `githubUser` | string | Your GitHub username (for constructing commit links). |
|
|
147
148
|
| `projects` | array | One entry per project you want dev logs for. |
|
|
148
|
-
| `projects[].key` | string | Subdirectory name in the dev-log repo
|
|
149
|
+
| `projects[].key` | string | Subdirectory name in the dev-log repo. |
|
|
150
|
+
| `projects[].label` | string (optional) | Display name for the project tab in the UI. Defaults to `key`. |
|
|
149
151
|
| `projects[].path` | string | Local filesystem path to the project. |
|
|
150
152
|
| `projects[].remote` | `"<owner>/<repo>"` | The project's GitHub remote, used to mark public commits and link them. |
|
|
151
153
|
|
package/bin/devlog.js
CHANGED
|
@@ -256,7 +256,8 @@ async function cmdPreview() {
|
|
|
256
256
|
process.exit(1);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
const projects = (config.projects || []).map((p) => ({ key: p.key, label: p.key }));
|
|
259
|
+
const projects = (config.projects || []).map((p) => ({ key: p.key, label: p.label || p.key }));
|
|
260
|
+
const branch = config.branch || 'main';
|
|
260
261
|
|
|
261
262
|
log.step(`Launching preview against github.com/${config.targetRepo}...`);
|
|
262
263
|
|
|
@@ -271,7 +272,7 @@ async function cmdPreview() {
|
|
|
271
272
|
...process.env,
|
|
272
273
|
VITE_DEVLOG_OWNER: owner,
|
|
273
274
|
VITE_DEVLOG_REPO: repo,
|
|
274
|
-
VITE_DEVLOG_BRANCH:
|
|
275
|
+
VITE_DEVLOG_BRANCH: branch,
|
|
275
276
|
VITE_DEVLOG_PROJECTS: JSON.stringify(projects),
|
|
276
277
|
},
|
|
277
278
|
});
|
package/config.example.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"targetRepo": "yourusername/daily-dev-log",
|
|
3
|
+
"branch": "main",
|
|
3
4
|
"gitAuthor": "Your Name",
|
|
4
5
|
"githubUser": "yourusername",
|
|
5
6
|
"projects": [
|
|
6
7
|
{
|
|
7
8
|
"key": "midnight-side-quest",
|
|
9
|
+
"label": "Midnight Side Quest",
|
|
8
10
|
"path": "/Users/yourusername/code/midnight-side-quest",
|
|
9
11
|
"remote": "yourusername/midnight-side-quest"
|
|
10
12
|
},
|
package/package.json
CHANGED
package/preview/vite.config.js
CHANGED
|
@@ -3,6 +3,13 @@ import react from '@vitejs/plugin-react';
|
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
5
|
plugins: [react()],
|
|
6
|
+
// Force pre-bundling of these packages so Vite's CJS interop adds the
|
|
7
|
+
// default-export shim. Without this, react-markdown's transitive
|
|
8
|
+
// `style-to-js` (CJS-only) blows up with "does not provide an export
|
|
9
|
+
// named 'default'" when imported by hast-util-to-jsx-runtime.
|
|
10
|
+
optimizeDeps: {
|
|
11
|
+
include: ['react-markdown', 'remark-gfm', 'style-to-js'],
|
|
12
|
+
},
|
|
6
13
|
server: {
|
|
7
14
|
port: 5173,
|
|
8
15
|
open: true,
|