@webship.co/workspace-docs 0.0.0-stage → 1.0.0-alpha1
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 +25 -2
- package/commands/cmd-tool-backup-doc.sh +20 -0
- package/commands/cmd-tool-git-change-filemode-to-false.sh +20 -0
- package/config/workspace.docs.settings.yml +13 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +17 -0
- package/dist/src/index.js.map +1 -0
- package/docs/AGENTS.md +21 -0
- package/docs/CLAUDE.md +7 -0
- package/docs/README.md +6 -0
- package/features/docs.feature +12 -0
- package/package.json +52 -4
package/README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @webship.co/workspace-docs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The **Docs** workspace of the [Webship Workspace](https://github.com/webship/workspace) dashboard:
|
|
4
|
+
the `docs/` folder (type `files`), its settings file (`core/config/workspace.docs.settings.yml`),
|
|
5
|
+
its commands and its docs, as a plugin.
|
|
6
|
+
|
|
7
|
+
## Use it
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd ~/workspace
|
|
11
|
+
bash core/scripts/plugins.sh --require github:webship/workspace-docs
|
|
12
|
+
bash core/scripts/plugins.sh --activate docs # puts `docs` on the workspaces list of settings.yml
|
|
13
|
+
bash core/scripts/plugins.sh --install docs # the folder, its settings file (once), its commands, its docs (once)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The settings file and the docs are placed once and never overwritten: they hold what you put there.
|
|
17
|
+
`--deactivate` takes the workspace off the list; the folder and its content stay.
|
|
18
|
+
|
|
19
|
+
## The commands
|
|
20
|
+
|
|
21
|
+
| Command |
|
|
22
|
+
| --- |
|
|
23
|
+
| `cmd-tool-backup-doc.sh` |
|
|
24
|
+
| `cmd-tool-git-change-filemode-to-false.sh` |
|
|
25
|
+
|
|
26
|
+
The bash functions these commands call live in the dashboard's `core/scripts/functions`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Bootstrap.
|
|
4
|
+
# Find the workspace tooling from this script, so a fresh clone needs no setup.
|
|
5
|
+
WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
|
|
6
|
+
source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
|
|
7
|
+
|
|
8
|
+
# Load workspace settings and extra lists.
|
|
9
|
+
eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.docs.settings.yml);
|
|
10
|
+
|
|
11
|
+
ARGPARSE_DESCRIPTION="Backup a doc"
|
|
12
|
+
argparse "$@" <<ARGEOF || exit 1
|
|
13
|
+
parser.add_argument('PROJECT_NAME',
|
|
14
|
+
help='The name of the project.')
|
|
15
|
+
ARGEOF
|
|
16
|
+
|
|
17
|
+
shift $#;
|
|
18
|
+
trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
|
|
19
|
+
|
|
20
|
+
backup_workspace_item "${PROJECT_NAME}" || exit 1 ;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Bootstrap.
|
|
4
|
+
# Find the workspace tooling from this script, so a fresh clone needs no setup.
|
|
5
|
+
WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
|
|
6
|
+
source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
|
|
7
|
+
|
|
8
|
+
# Load workspace settings and extra lists.
|
|
9
|
+
eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.docs.settings.yml);
|
|
10
|
+
|
|
11
|
+
ARGPARSE_DESCRIPTION="Change a project's git core.fileMode to false"
|
|
12
|
+
argparse "$@" <<ARGEOF || exit 1
|
|
13
|
+
parser.add_argument('PROJECT_NAME',
|
|
14
|
+
help='The name of the project.')
|
|
15
|
+
ARGEOF
|
|
16
|
+
|
|
17
|
+
shift $#;
|
|
18
|
+
|
|
19
|
+
cd ${WORKSPACE_ROOT}/docs/${PROJECT_NAME} ;
|
|
20
|
+
git config core.fileMode false ;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
doc:
|
|
2
|
+
name: docs
|
|
3
|
+
|
|
4
|
+
# What this folder's projects are, and which actions their rows offer:
|
|
5
|
+
# sites | code | files | media | ai-items — see core/workspace-app/WORKSPACES.md.
|
|
6
|
+
type: files
|
|
7
|
+
|
|
8
|
+
# What the assistant is called on THIS workspace's page, and what its composer says when empty.
|
|
9
|
+
# `default` in either means "whatever settings.yml says" — the global value, so a rename there
|
|
10
|
+
# still reaches this page. Set a value here to override it for this workspace alone.
|
|
11
|
+
assistant:
|
|
12
|
+
name: default
|
|
13
|
+
placeholder: default
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Docs workspace for Webship Workspace: the `docs/` folder as a plugin.
|
|
3
|
+
*
|
|
4
|
+
* What the package carries is placed by the installer from the manifest (the folder's settings file,
|
|
5
|
+
* its commands and its docs) and listed by --activate; the dashboard draws the workspace from the
|
|
6
|
+
* settings file like any other. Nothing to register at run time yet: this is where the folder's own
|
|
7
|
+
* rail buttons, row menus or assistant context would go.
|
|
8
|
+
*/
|
|
9
|
+
import type { PluginApi } from '@webship.co/workspace-plugin-api';
|
|
10
|
+
export declare const WORKSPACE_KEY = "docs";
|
|
11
|
+
export declare function register(api: PluginApi): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The Docs workspace for Webship Workspace: the `docs/` folder as a plugin.
|
|
4
|
+
*
|
|
5
|
+
* What the package carries is placed by the installer from the manifest (the folder's settings file,
|
|
6
|
+
* its commands and its docs) and listed by --activate; the dashboard draws the workspace from the
|
|
7
|
+
* settings file like any other. Nothing to register at run time yet: this is where the folder's own
|
|
8
|
+
* rail buttons, row menus or assistant context would go.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.WORKSPACE_KEY = void 0;
|
|
12
|
+
exports.register = register;
|
|
13
|
+
exports.WORKSPACE_KEY = 'docs';
|
|
14
|
+
function register(api) {
|
|
15
|
+
api.addAssistantContext(() => `The docs/ workspace is the Docs workspace (a plugin, @webship.co/workspace-docs); its commands are the cmd-*.sh scripts in that folder.`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAMH,4BAEC;AAJY,QAAA,aAAa,GAAG,MAAM,CAAC;AAEpC,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,yIAAyI,CAAC,CAAC;AAC3K,CAAC"}
|
package/docs/AGENTS.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Docs
|
|
2
|
+
|
|
3
|
+
Documentation projects, and what is generated from them — PDFs, HTML, screenshots.
|
|
4
|
+
|
|
5
|
+
Part of the **Webship Workspace** (`~/workspace`), a DDEV-only harness. The rules in the root
|
|
6
|
+
`CLAUDE.md` apply here too; what follows is what is specific to this folder.
|
|
7
|
+
|
|
8
|
+
## What an item is here
|
|
9
|
+
|
|
10
|
+
A markdown document, plus whatever has been generated FROM it — a PDF, an HTML render, a
|
|
11
|
+
screenshot. The generated files sit beside the source and are listed as artifacts.
|
|
12
|
+
|
|
13
|
+
## Commands here
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bash cmd-tool-backup-doc.sh # Bootstrap.
|
|
17
|
+
bash cmd-tool-git-change-filemode-to-false.sh # Bootstrap.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Every one locates the workspace from its own path, so there is nothing to export and nothing to
|
|
21
|
+
install. `--help` on any of them lists its arguments.
|
package/docs/CLAUDE.md
ADDED
package/docs/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Docs
|
|
2
|
+
--
|
|
3
|
+
|
|
4
|
+
* You could place your docs.
|
|
5
|
+
|
|
6
|
+
**Google Drive.** `bash cmd-tools-google-drive-sync.sh` (or the **Sync to Drive** button) pushes this folder to its Google Drive folder, new and changed files only, never deleting; `--dry-run` previews and `-a register` adds the Google Drive MCP server to Claude Code. Settings: `google_drive:` in `core/config/settings.yml`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Feature: The Docs workspace plugin
|
|
2
|
+
Once the plugin is activated and installed, the docs workspace is on the dashboard, and the
|
|
3
|
+
Plugins page lists the plugin with its four steps.
|
|
4
|
+
|
|
5
|
+
Scenario: The workspace page is there
|
|
6
|
+
Given I am on "/docs"
|
|
7
|
+
Then I should see "Docs"
|
|
8
|
+
|
|
9
|
+
Scenario: The plugin is listed on the Plugins page
|
|
10
|
+
Given I am on "/settings/plugins"
|
|
11
|
+
Then I should see "Docs"
|
|
12
|
+
And I should see "@webship.co/workspace-docs"
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webship.co/workspace-docs",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-alpha1",
|
|
4
|
+
"description": "The Docs workspace for Webship Workspace: the `docs/` folder (type files), its settings file, its 2 commands and its docs, activated as a plugin.",
|
|
5
|
+
"main": "dist/src/index.js",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/webship/workspace-docs.git"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/src",
|
|
14
|
+
"commands",
|
|
15
|
+
"config",
|
|
16
|
+
"docs",
|
|
17
|
+
"features",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc -p tsconfig.json",
|
|
22
|
+
"prepare": "npm run build",
|
|
23
|
+
"test": "npm run build && node --test dist/tests/*.test.js",
|
|
24
|
+
"lint": "tsc -p tsconfig.json --noEmit"
|
|
25
|
+
},
|
|
26
|
+
"workspacePlugin": {
|
|
27
|
+
"name": "docs",
|
|
28
|
+
"label": "Docs",
|
|
29
|
+
"workspace": {
|
|
30
|
+
"key": "docs",
|
|
31
|
+
"settingsTemplate": "config/workspace.docs.settings.yml",
|
|
32
|
+
"files": [
|
|
33
|
+
"commands/cmd-tool-backup-doc.sh",
|
|
34
|
+
"commands/cmd-tool-git-change-filemode-to-false.sh"
|
|
35
|
+
],
|
|
36
|
+
"docs": [
|
|
37
|
+
"docs/AGENTS.md",
|
|
38
|
+
"docs/CLAUDE.md",
|
|
39
|
+
"docs/README.md"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"features": [
|
|
43
|
+
"features/docs.feature"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^24.0.0",
|
|
48
|
+
"@webship.co/workspace-plugin-api": "^1.0.0-alpha1",
|
|
49
|
+
"typescript": "^5.9.0"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
}
|
|
54
|
+
}
|