quackage 1.0.46 → 1.0.48
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/docs/.nojekyll +0 -0
- package/docs/README.md +111 -0
- package/docs/_sidebar.md +35 -0
- package/docs/_topbar.md +5 -0
- package/docs/commands/boilerplate/README.md +45 -0
- package/docs/commands/boilerplate/boilerplate.md +55 -0
- package/docs/commands/boilerplate/buildtemplates.md +47 -0
- package/docs/commands/boilerplate/listtemplates.md +38 -0
- package/docs/commands/building/README.md +28 -0
- package/docs/commands/building/build.md +77 -0
- package/docs/commands/building/copy-files-from-to.md +34 -0
- package/docs/commands/building/run-mocha-tests.md +43 -0
- package/docs/commands/compiling/README.md +21 -0
- package/docs/commands/compiling/assemble_json_views.md +74 -0
- package/docs/commands/compiling/stricture-compile.md +33 -0
- package/docs/commands/compiling/stricture-legaacy.md +33 -0
- package/docs/commands/documentation/README.md +41 -0
- package/docs/commands/documentation/docs-serve.md +54 -0
- package/docs/commands/documentation/docuserve-inject.md +46 -0
- package/docs/commands/documentation/generate-documentation.md +47 -0
- package/docs/commands/documentation/indoctrinate-index.md +41 -0
- package/docs/commands/documentation/indoctrinate.md +46 -0
- package/docs/commands/documentation/prepare-docs.md +65 -0
- package/docs/commands/documentation/prepare-local.md +49 -0
- package/docs/commands/package-management/README.md +39 -0
- package/docs/commands/package-management/lint.md +36 -0
- package/docs/commands/package-management/luxuryupdatepackage.md +44 -0
- package/docs/commands/package-management/updatepackage.md +48 -0
- package/docs/cover.md +13 -0
- package/docs/css/docuserve.css +73 -0
- package/docs/errorpage.md +9 -0
- package/docs/index.html +39 -0
- package/docs/retold-catalog.json +255 -0
- package/docs/retold-keyword-index.json +8424 -0
- package/package.json +4 -4
- package/source/Quackage-CLIProgram.js +1 -0
- package/source/commands/Quackage-Command-DocuservePrepareLocal.js +75 -0
- package/source/commands/Quackage-Command-DocuserveServe.js +2 -2
- package/source/commands/Quackage-Command-PrepareDocs.js +2 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# stricture-legaacy
|
|
2
|
+
|
|
3
|
+
Run a legacy Stricture command.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack stricture-legaacy <output_folder> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `str`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `output_folder` | The folder in which to generate content (required) |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-m, --markdown <folder>` | | Folder with markdown documentation; subfolders are okay |
|
|
24
|
+
|
|
25
|
+
## Status
|
|
26
|
+
|
|
27
|
+
> Stub: This command is currently a placeholder. It accepts arguments and options but does not yet perform any processing. It is intended to provide backward compatibility with older Stricture workflows.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
quack str ./output
|
|
33
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
Commands for generating and serving documentation. Quackage integrates three documentation tools:
|
|
4
|
+
|
|
5
|
+
- JSDoc -- extracts API documentation from source code comments
|
|
6
|
+
- Indoctrinate -- scans a module tree and generates a documentation catalog with cross-module navigation and keyword search
|
|
7
|
+
- pict-docuserve -- provides a web application shell (based on Docsify) for browsing documentation, either as injected static assets or via a local dev server
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
- [generate-documentation](generate-documentation.md) -- Generate JSDoc documentation from source
|
|
12
|
+
- [indoctrinate](indoctrinate.md) -- Generate a module documentation catalog
|
|
13
|
+
- [indoctrinate-index](indoctrinate-index.md) -- Generate a keyword search index
|
|
14
|
+
- [docuserve-inject](docuserve-inject.md) -- Inject pict-docuserve assets for static hosting
|
|
15
|
+
- [prepare-docs](prepare-docs.md) -- All-in-one documentation preparation
|
|
16
|
+
- [prepare-local](prepare-local.md) -- Copy local JS bundles for offline use
|
|
17
|
+
- [docs-serve](docs-serve.md) -- Serve documentation locally
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
For most projects, the all-in-one `prepare-docs` command is all you need:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Prepare documentation (catalog + search index + web assets)
|
|
25
|
+
quack prepare-docs ./docs -d ./modules
|
|
26
|
+
|
|
27
|
+
# Serve it locally
|
|
28
|
+
quack docs-serve ./docs
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Both commands default to `./docs` if no folder argument is provided.
|
|
32
|
+
|
|
33
|
+
## Documentation Pipeline
|
|
34
|
+
|
|
35
|
+
The `prepare-docs` command runs these three steps in sequence:
|
|
36
|
+
|
|
37
|
+
1. Indoctrinate catalog -- scans the module directory tree and generates `retold-catalog.json`
|
|
38
|
+
2. Keyword index -- generates `retold-keyword-index.json` for search
|
|
39
|
+
3. Docuserve inject -- copies the pict-docuserve web application assets and writes a `.nojekyll` file for GitHub Pages
|
|
40
|
+
|
|
41
|
+
You can also run each step individually for finer control.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# docs-serve
|
|
2
|
+
|
|
3
|
+
Serve a documentation folder locally using pict-docuserve.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack docs-serve [docs_folder] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `serve-docs`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Default | Description |
|
|
16
|
+
|----------|---------|-------------|
|
|
17
|
+
| `docs_folder` | `./docs` | The documentation folder to serve |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-p, --port <port>` | `3333` | Port to serve on |
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
1. Resolves the docs folder path (defaults to `./docs` if not provided)
|
|
28
|
+
2. Validates the folder exists
|
|
29
|
+
3. Locates the `pict-docuserve` binary
|
|
30
|
+
4. Runs `pict-docuserve serve` to start a local HTTP server
|
|
31
|
+
|
|
32
|
+
The server runs in the foreground until you stop it with Ctrl+C.
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Serve ./docs on the default port (3333)
|
|
38
|
+
quack docs-serve
|
|
39
|
+
|
|
40
|
+
# Serve on a custom port
|
|
41
|
+
quack serve-docs ./docs --port 8080
|
|
42
|
+
|
|
43
|
+
# Prepare and serve in one line
|
|
44
|
+
quack prepare-docs && quack docs-serve
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then open `http://localhost:3333` in your browser.
|
|
48
|
+
|
|
49
|
+
This is equivalent to the standard npm script added by `updatepackage`:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm run docs-serve
|
|
53
|
+
# runs: npx quack docs-serve ./docs
|
|
54
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# docuserve-inject
|
|
2
|
+
|
|
3
|
+
Inject pict-docuserve web application assets into a documentation folder for static hosting.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack docuserve-inject <docs_folder>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `docuserve`, `inject-docs`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `docs_folder` | Target documentation folder to inject assets into (required) |
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. Resolves the docs folder path, creating it if necessary
|
|
22
|
+
2. Locates the `pict-docuserve` binary
|
|
23
|
+
3. Runs `pict-docuserve inject` to copy the web application shell into the target folder
|
|
24
|
+
4. Writes an empty `.nojekyll` file for GitHub Pages compatibility (prevents Jekyll processing)
|
|
25
|
+
|
|
26
|
+
## What Gets Injected
|
|
27
|
+
|
|
28
|
+
The inject command copies a lightweight set of files into your docs folder:
|
|
29
|
+
|
|
30
|
+
- `index.html` -- the documentation shell (loads JS dependencies from jsDelivr CDN)
|
|
31
|
+
- `css/` -- stylesheet assets for the viewer
|
|
32
|
+
- `.nojekyll` -- prevents GitHub Pages from processing files with Jekyll
|
|
33
|
+
|
|
34
|
+
JavaScript dependencies (`pict` and `pict-docuserve`) are loaded from the jsDelivr CDN by default, keeping the injected footprint small. For offline or local development, use `prepare-local` to copy local JS bundles instead.
|
|
35
|
+
|
|
36
|
+
After injection, the folder can be served as a static site (e.g. via GitHub Pages) or locally with `docs-serve`.
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Inject into ./docs
|
|
42
|
+
quack inject-docs ./docs
|
|
43
|
+
|
|
44
|
+
# Then serve locally to preview
|
|
45
|
+
quack docs-serve ./docs
|
|
46
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# generate-documentation
|
|
2
|
+
|
|
3
|
+
Generate JSDoc documentation from source files.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack generate-documentation <output_folder> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `dgen`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `output_folder` | The folder in which to generate documentation output (required) |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-m, --markdown <folder>` | | Folder with markdown documentation; subfolders are okay |
|
|
24
|
+
| `-s, --source <folder>` | | Folder with JavaScript source to parse JSDoc from |
|
|
25
|
+
| `-c, --config <file>` | | Path to a JSDoc config file |
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
1. Resolves the output folder path, creating it if necessary
|
|
30
|
+
2. If `--source` is provided, runs JSDoc with the `-X` flag to produce raw JSON output
|
|
31
|
+
3. JSDoc is resolved from your project's `node_modules` first; falls back to `npx jsdoc` if not found locally
|
|
32
|
+
4. Writes the raw JSDoc JSON to `JSDocOutput.json` in the output folder
|
|
33
|
+
5. Supports a 60-second timeout for JSDoc execution
|
|
34
|
+
|
|
35
|
+
## Output
|
|
36
|
+
|
|
37
|
+
The primary output is `JSDocOutput.json` -- the raw JSON doclet array produced by `jsdoc -X`. This can be consumed by other tools for further processing.
|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Generate docs from source/ into docs/api/
|
|
43
|
+
quack dgen ./docs/api --source ./source
|
|
44
|
+
|
|
45
|
+
# With a custom JSDoc config
|
|
46
|
+
quack dgen ./docs/api --source ./source --config ./jsdoc.conf.json
|
|
47
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# indoctrinate-index
|
|
2
|
+
|
|
3
|
+
Generate a Lunr keyword search index from module documentation using Indoctrinate.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack indoctrinate-index <docs_folder> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `indoc-index`, `keyword-index`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `docs_folder` | The documentation output folder for the generated keyword index (required) |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-d, --directory_root <path>` | CWD | Root directory to scan for modules |
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
1. Resolves the docs folder path, creating it if necessary
|
|
28
|
+
2. Locates the `indoctrinate` binary
|
|
29
|
+
3. Runs `indoctrinate generate_keyword_index` with the directory root and output file
|
|
30
|
+
4. Writes `retold-keyword-index.json` to the docs folder
|
|
31
|
+
|
|
32
|
+
## Output
|
|
33
|
+
|
|
34
|
+
The keyword index (`retold-keyword-index.json`) is a pre-built Lunr search index that enables client-side full-text search across all module documentation. It is consumed by the pict-docuserve web application's search feature.
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Generate keyword index from ./modules into ./docs
|
|
40
|
+
quack keyword-index ./docs -d ./modules
|
|
41
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# indoctrinate
|
|
2
|
+
|
|
3
|
+
Generate a documentation catalog from module documentation folders using the Indoctrinate tool.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack indoctrinate <docs_folder> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `indoc`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `docs_folder` | The documentation output folder for the generated catalog (required) |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-d, --directory_root <path>` | CWD | Root directory to scan for modules |
|
|
24
|
+
| `-b, --branch <branch>` | `master` | Git branch for GitHub raw URLs |
|
|
25
|
+
| `-g, --github_org <org>` | `stevenvelozo` | GitHub organization for raw URLs |
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
1. Resolves the docs folder path, creating it if necessary
|
|
30
|
+
2. Locates the `indoctrinate` binary
|
|
31
|
+
3. Runs `indoctrinate generate_catalog` with the directory root, output file, branch and GitHub org parameters
|
|
32
|
+
4. Writes `retold-catalog.json` to the docs folder
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
The catalog file (`retold-catalog.json`) contains a structured listing of all modules found under the directory root, including their documentation paths and GitHub raw content URLs. This is consumed by the pict-docuserve web application for cross-module navigation.
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Generate catalog from ./modules into ./docs
|
|
42
|
+
quack indoc ./docs -d ./modules
|
|
43
|
+
|
|
44
|
+
# Different branch and org
|
|
45
|
+
quack indoc ./docs -d ./modules -b develop -g myorg
|
|
46
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# prepare-docs
|
|
2
|
+
|
|
3
|
+
All-in-one documentation preparation. Generates the catalog, builds the keyword search index and injects pict-docuserve assets in a single command.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack prepare-docs [docs_folder] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `docs`, `prep-docs`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Default | Description |
|
|
16
|
+
|----------|---------|-------------|
|
|
17
|
+
| `docs_folder` | `./docs` | The documentation folder to prepare |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-d, --directory_root <path>` | CWD | Root directory to scan for modules |
|
|
24
|
+
| `-b, --branch <branch>` | `master` | Git branch for GitHub raw URLs |
|
|
25
|
+
| `-g, --github_org <org>` | `stevenvelozo` | GitHub organization for raw URLs |
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
Runs three steps in sequence:
|
|
30
|
+
|
|
31
|
+
### Step 1: Indoctrinate Catalog
|
|
32
|
+
|
|
33
|
+
Runs `indoctrinate generate_catalog` to scan the module directory tree and produce `retold-catalog.json` in the docs folder.
|
|
34
|
+
|
|
35
|
+
### Step 2: Keyword Index
|
|
36
|
+
|
|
37
|
+
Runs `indoctrinate generate_keyword_index` to produce `retold-keyword-index.json` in the docs folder.
|
|
38
|
+
|
|
39
|
+
### Step 3: Docuserve Inject
|
|
40
|
+
|
|
41
|
+
Runs `pict-docuserve inject` to copy the web application assets into the docs folder.
|
|
42
|
+
|
|
43
|
+
### Final
|
|
44
|
+
|
|
45
|
+
Writes a `.nojekyll` file for GitHub Pages compatibility.
|
|
46
|
+
|
|
47
|
+
## Example
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Prepare docs with defaults (./docs folder, scan CWD)
|
|
51
|
+
quack prepare-docs
|
|
52
|
+
|
|
53
|
+
# Specify folder and module root
|
|
54
|
+
quack prepare-docs ./docs -d ./modules
|
|
55
|
+
|
|
56
|
+
# Use a different branch and org
|
|
57
|
+
quack docs ./docs -d ./modules -b develop -g myorg
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This is equivalent to the standard npm script added by `updatepackage`:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm run docs
|
|
64
|
+
# runs: npx quack prepare-docs ./docs -d ./modules
|
|
65
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# prepare-local
|
|
2
|
+
|
|
3
|
+
Copy local JavaScript bundles into a documentation folder for offline use. Rewrites `index.html` to reference the local files instead of the jsDelivr CDN.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack prepare-local [docs_folder]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `local-docs`, `stage-local`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Default | Description |
|
|
16
|
+
|----------|---------|-------------|
|
|
17
|
+
| `docs_folder` | `./docs` | The documentation folder to prepare for offline use |
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. Resolves the docs folder path (defaults to `./docs` if not provided)
|
|
22
|
+
2. Locates the `pict-docuserve` binary
|
|
23
|
+
3. Runs `pict-docuserve prepare-local` which:
|
|
24
|
+
- Copies `pict.min.js` and its source map from the pict-docuserve dist folder into a `js/` subfolder
|
|
25
|
+
- Copies `pict-docuserve.min.js` and its source map into the docs folder root
|
|
26
|
+
- Rewrites `index.html` to load JavaScript from local paths instead of jsDelivr CDN
|
|
27
|
+
|
|
28
|
+
## When to Use
|
|
29
|
+
|
|
30
|
+
By default, `docuserve-inject` and `prepare-docs` produce an `index.html` that loads `pict` and `pict-docuserve` from the jsDelivr CDN. This keeps the injected footprint small and ensures you always get the latest compatible version.
|
|
31
|
+
|
|
32
|
+
Use `prepare-local` when you need:
|
|
33
|
+
|
|
34
|
+
- Offline documentation browsing (no internet required)
|
|
35
|
+
- A fully self-contained docs folder for air-gapped environments
|
|
36
|
+
- Pinned JS versions that do not change between deploys
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Prepare docs normally (CDN mode)
|
|
42
|
+
quack prepare-docs ./docs -d ./modules
|
|
43
|
+
|
|
44
|
+
# Then copy local JS bundles for offline use
|
|
45
|
+
quack prepare-local ./docs
|
|
46
|
+
|
|
47
|
+
# Serve locally
|
|
48
|
+
quack docs-serve ./docs
|
|
49
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Package Management
|
|
2
|
+
|
|
3
|
+
Commands for keeping your `package.json` in sync with quackage conventions. These commands ensure every module in your ecosystem has consistent test, build, coverage and Docker scripts.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- [updatepackage](updatepackage.md) -- Add standard scripts and configuration sections
|
|
8
|
+
- [luxuryupdatepackage](luxuryupdatepackage.md) -- Add Docker-based luxury dev environment scripts
|
|
9
|
+
- [lint](lint.md) -- Audit your package.json against quackage defaults
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Quackage defines a canonical set of `package.json` sections and npm scripts. The `updatepackage` command adds any missing entries, while `lint` reports on what matches and what doesn't -- without modifying anything.
|
|
14
|
+
|
|
15
|
+
Both `updatepackage` and `luxuryupdatepackage` create a backup at `.package.json.quackage.bak` before writing changes.
|
|
16
|
+
|
|
17
|
+
### Standard Scripts
|
|
18
|
+
|
|
19
|
+
The following scripts are managed by `updatepackage`:
|
|
20
|
+
|
|
21
|
+
| Script | Command |
|
|
22
|
+
|--------|---------|
|
|
23
|
+
| `start` | `node {main}` |
|
|
24
|
+
| `test` | `npx mocha -u tdd -R spec` |
|
|
25
|
+
| `tests` | `npx mocha -u tdd --exit -R spec --grep` |
|
|
26
|
+
| `coverage` | `npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec` |
|
|
27
|
+
| `build` | `npx quack build` |
|
|
28
|
+
| `docs` | `npx quack prepare-docs ./docs -d ./modules` |
|
|
29
|
+
| `docs-serve` | `npx quack docs-serve ./docs` |
|
|
30
|
+
|
|
31
|
+
### Luxury Scripts
|
|
32
|
+
|
|
33
|
+
The following scripts are managed by `luxuryupdatepackage`:
|
|
34
|
+
|
|
35
|
+
| Script | Command |
|
|
36
|
+
|--------|---------|
|
|
37
|
+
| `docker-dev-build` | `docker build ./ -f Dockerfile_LUXURYCode -t {name}-image:local` |
|
|
38
|
+
| `docker-dev-run` | `docker run -it -d --name {name}-dev ...` |
|
|
39
|
+
| `docker-dev-shell` | `docker exec -it {name}-dev /bin/bash` |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# lint
|
|
2
|
+
|
|
3
|
+
Audit your `package.json` against quackage's default configuration without modifying anything.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack lint
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
Performs a read-only comparison of your `package.json` against the quackage defaults:
|
|
14
|
+
|
|
15
|
+
1. Checks each quackage-managed section (e.g. `mocha`) for existence and value match
|
|
16
|
+
2. Checks each quackage-managed npm script for existence and value match
|
|
17
|
+
3. Reports `[OK]` or `[NOT OK]` for each item
|
|
18
|
+
4. For mismatched scripts, shows both the current and expected values
|
|
19
|
+
|
|
20
|
+
No files are modified. Use `updatepackage` to apply fixes.
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
quack lint
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Output:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
--> mymodule:1.0.0/package.json SECTION { mocha:... }: [OK]
|
|
32
|
+
--> mymodule:1.0.0/package.json SCRIPT { scripts.test }: [OK]
|
|
33
|
+
--> mymodule:1.0.0/package.json SCRIPT { scripts.build }: [NOT OK]
|
|
34
|
+
> Current Script: [webpack --mode production]
|
|
35
|
+
> Quackage Script: [npx quack build]
|
|
36
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# luxuryupdatepackage
|
|
2
|
+
|
|
3
|
+
Add Docker-based luxury development environment scripts to your `package.json`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack luxuryupdatepackage [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `luxury_update_package`, `lux`
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
| Option | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `-f, --force` | Force overwrite existing scripts and sections. |
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
Works identically to `updatepackage` but manages the luxury (Docker) script set instead of the standard scripts. It:
|
|
22
|
+
|
|
23
|
+
1. Reads the current `package.json`
|
|
24
|
+
2. Adds any missing quackage-managed sections (same as `updatepackage`)
|
|
25
|
+
3. Adds the Docker dev environment scripts (`docker-dev-build`, `docker-dev-run`, `docker-dev-shell`)
|
|
26
|
+
4. Backs up to `.package.json.quackage.bak` before writing
|
|
27
|
+
|
|
28
|
+
## Managed Scripts
|
|
29
|
+
|
|
30
|
+
| Script | Purpose |
|
|
31
|
+
|--------|---------|
|
|
32
|
+
| `docker-dev-build` | Build a Docker image from `Dockerfile_LUXURYCode` |
|
|
33
|
+
| `docker-dev-run` | Run the dev container with mounted volumes and random ports |
|
|
34
|
+
| `docker-dev-shell` | Open a bash shell in the running dev container |
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Add Docker scripts to your project
|
|
40
|
+
quack lux
|
|
41
|
+
|
|
42
|
+
# Force overwrite existing Docker scripts
|
|
43
|
+
quack lux --force
|
|
44
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# updatepackage
|
|
2
|
+
|
|
3
|
+
Add standard test, build, coverage and documentation scripts to your `package.json`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack updatepackage [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `update_package`
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
| Option | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `-f, --force` | Force overwrite existing scripts and sections. Use at your own quacking peril. |
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. Reads the current `package.json` from the working directory
|
|
22
|
+
2. Compares each quackage-managed section (e.g. `mocha`) against the canonical defaults
|
|
23
|
+
3. Compares each quackage-managed npm script against the canonical scripts
|
|
24
|
+
4. Without `--force`: only adds sections and scripts that are missing; existing values are reported but not overwritten
|
|
25
|
+
5. With `--force`: overwrites all managed sections and scripts regardless of current values
|
|
26
|
+
6. Backs up the original `package.json` to `.package.json.quackage.bak`
|
|
27
|
+
7. Writes the updated `package.json`
|
|
28
|
+
|
|
29
|
+
## Managed Sections
|
|
30
|
+
|
|
31
|
+
- `mocha` -- Mocha test runner configuration (TDD UI, spec reporter, 5s timeout)
|
|
32
|
+
|
|
33
|
+
## Managed Scripts
|
|
34
|
+
|
|
35
|
+
- `start`, `test`, `tests`, `coverage`, `build`, `docs`, `docs-serve`
|
|
36
|
+
|
|
37
|
+
## Example
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# See what would change (use lint first)
|
|
41
|
+
quack lint
|
|
42
|
+
|
|
43
|
+
# Add missing scripts
|
|
44
|
+
quack updatepackage
|
|
45
|
+
|
|
46
|
+
# Overwrite everything to match quackage defaults
|
|
47
|
+
quack updatepackage --force
|
|
48
|
+
```
|
package/docs/cover.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Quackage
|
|
2
|
+
|
|
3
|
+
> Building. Testing. Quacking. Reloading.
|
|
4
|
+
|
|
5
|
+
A CLI toolkit for managing, building, testing and documenting JavaScript/Node.js modules. Quackage wraps common tools behind a consistent command interface so every module in your ecosystem follows the same conventions.
|
|
6
|
+
|
|
7
|
+
- **Consistent** — One set of conventions for npm scripts, builds and documentation across all your modules
|
|
8
|
+
- **Automated** — Generate configs, run builds, prepare docs and scaffold projects from templates
|
|
9
|
+
- **Integrated** — Ties together Gulp, Mocha, Babel, Browserify, JSDoc, Indoctrinate and pict-docuserve
|
|
10
|
+
|
|
11
|
+
[Get Started](README.md)
|
|
12
|
+
[Command Reference](commands/documentation/README.md)
|
|
13
|
+
[GitHub](https://github.com/stevenvelozo/quackage)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
Pict Docuserve - Base Styles
|
|
3
|
+
============================================================================ */
|
|
4
|
+
|
|
5
|
+
/* Reset and base */
|
|
6
|
+
*, *::before, *::after {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
html, body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
line-height: 1.5;
|
|
16
|
+
color: #423D37;
|
|
17
|
+
background-color: #fff;
|
|
18
|
+
-webkit-font-smoothing: antialiased;
|
|
19
|
+
-moz-osx-font-smoothing: grayscale;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Typography */
|
|
23
|
+
h1, h2, h3, h4, h5, h6 {
|
|
24
|
+
margin-top: 0;
|
|
25
|
+
line-height: 1.3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
a {
|
|
29
|
+
color: #2E7D74;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a:hover {
|
|
34
|
+
color: #256861;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Application container */
|
|
38
|
+
#Docuserve-Application-Container {
|
|
39
|
+
min-height: 100vh;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Utility: scrollbar styling */
|
|
43
|
+
::-webkit-scrollbar {
|
|
44
|
+
width: 8px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
::-webkit-scrollbar-track {
|
|
48
|
+
background: #F5F0E8;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
::-webkit-scrollbar-thumb {
|
|
52
|
+
background: #D4CCBE;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
::-webkit-scrollbar-thumb:hover {
|
|
57
|
+
background: #B5AA9A;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Responsive adjustments */
|
|
61
|
+
@media (max-width: 768px) {
|
|
62
|
+
html {
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#Docuserve-Sidebar-Container {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.docuserve-body {
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
}
|
|
73
|
+
}
|