quackage 1.0.47 → 1.0.50
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/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 +14 -3
package/docs/.nojekyll
ADDED
|
File without changes
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Quackage
|
|
2
|
+
|
|
3
|
+
> Building. Testing. Quacking. Reloading.
|
|
4
|
+
|
|
5
|
+
Quackage is a CLI toolkit for managing, building, testing and documenting JavaScript/Node.js modules. It wraps common tools (Gulp, Mocha, Babel, Browserify, JSDoc, Indoctrinate, pict-docuserve) behind a consistent command interface and manages `package.json` configuration so every module in your ecosystem follows the same conventions.
|
|
6
|
+
|
|
7
|
+
Quackage exists because maintaining dozens of modules by hand is tedious and error-prone. Instead of copy-pasting npm scripts, Babel configs and Gulp tasks between projects, quackage keeps a single canonical set of defaults and applies them everywhere. When conventions change, one `quack updatepackage` brings every module up to date.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install quackage
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or install globally:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g quackage
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Quackage provides two equivalent CLI entry points:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
quack <command> [options]
|
|
27
|
+
qua <command> [options]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run `quack --help` to see all available commands, or `quack <command> --help` for details on a specific command.
|
|
31
|
+
|
|
32
|
+
## Command Reference
|
|
33
|
+
|
|
34
|
+
Commands are organized into five categories:
|
|
35
|
+
|
|
36
|
+
### [Package Management](commands/package-management/README.md)
|
|
37
|
+
|
|
38
|
+
Commands for keeping your `package.json` in sync with quackage conventions.
|
|
39
|
+
|
|
40
|
+
| Command | Aliases | Description |
|
|
41
|
+
|---------|---------|-------------|
|
|
42
|
+
| `updatepackage` | `update_package` | Add standard test, build and coverage scripts |
|
|
43
|
+
| `luxuryupdatepackage` | `luxury_update_package`, `lux` | Add Docker-based luxury dev environment scripts |
|
|
44
|
+
| `lint` | | Audit your package.json against quackage defaults |
|
|
45
|
+
|
|
46
|
+
### [Boilerplate](commands/boilerplate/README.md)
|
|
47
|
+
|
|
48
|
+
Commands for generating and managing file templates.
|
|
49
|
+
|
|
50
|
+
| Command | Aliases | Description |
|
|
51
|
+
|---------|---------|-------------|
|
|
52
|
+
| `boilerplate` | `boil`, `bp` | Generate files from a template fileset |
|
|
53
|
+
| `listtemplates` | `list`, `ls`, `lt` | Show available template filesets |
|
|
54
|
+
| `buildtemplates` | `bt` | Create template filesets from a folder |
|
|
55
|
+
|
|
56
|
+
### [Compiling](commands/compiling/README.md)
|
|
57
|
+
|
|
58
|
+
Commands for compiling schemas and assembling view configurations.
|
|
59
|
+
|
|
60
|
+
| Command | Aliases | Description |
|
|
61
|
+
|---------|---------|-------------|
|
|
62
|
+
| `stricture-compile` | `scomp` | Compile Stricture DDL into a Meadow schema |
|
|
63
|
+
| `stricture-legaacy` | `str` | Run a legacy Stricture command |
|
|
64
|
+
| `assemble_json_views` | `ajv` | Assemble Pict JSON view configurations from HTML |
|
|
65
|
+
|
|
66
|
+
### [Building](commands/building/README.md)
|
|
67
|
+
|
|
68
|
+
Commands for building, copying and testing your module.
|
|
69
|
+
|
|
70
|
+
| Command | Aliases | Description |
|
|
71
|
+
|---------|---------|-------------|
|
|
72
|
+
| `build` | | Browserify and minify your module into `dist/` |
|
|
73
|
+
| `copy-files-from-to` | `copy`, `cp` | Copy files to a staging location |
|
|
74
|
+
| `run-mocha-tests` | `test` | Run Mocha tests in TDD mode |
|
|
75
|
+
|
|
76
|
+
### [Documentation](commands/documentation/README.md)
|
|
77
|
+
|
|
78
|
+
Commands for generating and serving documentation.
|
|
79
|
+
|
|
80
|
+
| Command | Aliases | Description |
|
|
81
|
+
|---------|---------|-------------|
|
|
82
|
+
| `generate-documentation` | `dgen` | Generate JSDoc documentation from source |
|
|
83
|
+
| `indoctrinate` | `indoc` | Generate a module documentation catalog |
|
|
84
|
+
| `indoctrinate-index` | `indoc-index`, `keyword-index` | Generate a keyword search index |
|
|
85
|
+
| `docuserve-inject` | `docuserve`, `inject-docs` | Inject pict-docuserve assets for static hosting |
|
|
86
|
+
| `prepare-docs` | `docs`, `prep-docs` | All-in-one documentation preparation |
|
|
87
|
+
| `prepare-local` | `local-docs`, `stage-local` | Copy local JS bundles for offline use |
|
|
88
|
+
| `docs-serve` | `serve-docs` | Serve documentation locally |
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
Quackage looks for a `.quackage.json` file in your project root for custom configuration. If none is found it uses sensible defaults defined in `Default-Quackage-Configuration.json`.
|
|
93
|
+
|
|
94
|
+
Key configuration sections:
|
|
95
|
+
|
|
96
|
+
- `GulpExecutions` -- Build targets (default and compatible)
|
|
97
|
+
- `GulpfileConfiguration` -- Entry point, output folder, file naming
|
|
98
|
+
- `DefaultBabelRC` -- Babel preset and source map settings
|
|
99
|
+
- `PackageScripts` -- Standard npm scripts quackage manages
|
|
100
|
+
- `LuxuryPackageScripts` -- Docker dev environment scripts
|
|
101
|
+
- `WatchSettings` -- Folders and commands for file watching
|
|
102
|
+
|
|
103
|
+
## Executable Resolution
|
|
104
|
+
|
|
105
|
+
Quackage resolves tool binaries (gulp, mocha, indoctrinate, pict-docuserve, copy-files-from-to) by searching three locations in order:
|
|
106
|
+
|
|
107
|
+
1. `{CWD}/node_modules/.bin/` -- your project's local install
|
|
108
|
+
2. `{quackage}/../.bin/` -- relative to the quackage package
|
|
109
|
+
3. `{quackage}/node_modules/.bin/` -- quackage's own dependencies
|
|
110
|
+
|
|
111
|
+
This means quackage works whether installed locally, globally or from a monorepo root.
|
package/docs/_sidebar.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
- [Quackage](README.md)
|
|
2
|
+
|
|
3
|
+
- Package Management
|
|
4
|
+
- [Overview](commands/package-management/README.md)
|
|
5
|
+
- [updatepackage](commands/package-management/updatepackage.md)
|
|
6
|
+
- [luxuryupdatepackage](commands/package-management/luxuryupdatepackage.md)
|
|
7
|
+
- [lint](commands/package-management/lint.md)
|
|
8
|
+
|
|
9
|
+
- Boilerplate
|
|
10
|
+
- [Overview](commands/boilerplate/README.md)
|
|
11
|
+
- [boilerplate](commands/boilerplate/boilerplate.md)
|
|
12
|
+
- [listtemplates](commands/boilerplate/listtemplates.md)
|
|
13
|
+
- [buildtemplates](commands/boilerplate/buildtemplates.md)
|
|
14
|
+
|
|
15
|
+
- Compiling
|
|
16
|
+
- [Overview](commands/compiling/README.md)
|
|
17
|
+
- [stricture-compile](commands/compiling/stricture-compile.md)
|
|
18
|
+
- [stricture-legaacy](commands/compiling/stricture-legaacy.md)
|
|
19
|
+
- [assemble_json_views](commands/compiling/assemble_json_views.md)
|
|
20
|
+
|
|
21
|
+
- Building
|
|
22
|
+
- [Overview](commands/building/README.md)
|
|
23
|
+
- [build](commands/building/build.md)
|
|
24
|
+
- [copy-files-from-to](commands/building/copy-files-from-to.md)
|
|
25
|
+
- [run-mocha-tests](commands/building/run-mocha-tests.md)
|
|
26
|
+
|
|
27
|
+
- Documentation
|
|
28
|
+
- [Overview](commands/documentation/README.md)
|
|
29
|
+
- [generate-documentation](commands/documentation/generate-documentation.md)
|
|
30
|
+
- [indoctrinate](commands/documentation/indoctrinate.md)
|
|
31
|
+
- [indoctrinate-index](commands/documentation/indoctrinate-index.md)
|
|
32
|
+
- [docuserve-inject](commands/documentation/docuserve-inject.md)
|
|
33
|
+
- [prepare-docs](commands/documentation/prepare-docs.md)
|
|
34
|
+
- [prepare-local](commands/documentation/prepare-local.md)
|
|
35
|
+
- [docs-serve](commands/documentation/docs-serve.md)
|
package/docs/_topbar.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Boilerplate
|
|
2
|
+
|
|
3
|
+
Commands for generating and managing file templates. Quackage uses a JSON-based template system that lets you scaffold common file structures from reusable filesets.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- [boilerplate](boilerplate.md) -- Generate files from a template fileset
|
|
8
|
+
- [listtemplates](listtemplates.md) -- Show available template filesets
|
|
9
|
+
- [buildtemplates](buildtemplates.md) -- Create template filesets from a folder
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Template filesets are stored in `.quackage-templates.json` files. Quackage merges templates from three sources (in order):
|
|
14
|
+
|
|
15
|
+
1. Built-in -- shipped with the quackage package
|
|
16
|
+
2. Project -- `.quackage-templates.json` in your current working directory
|
|
17
|
+
3. Home -- `~/.quackage-templates.json` in your home directory
|
|
18
|
+
|
|
19
|
+
Later sources override earlier ones, so you can customize built-in templates at the project or user level.
|
|
20
|
+
|
|
21
|
+
## Template File Format
|
|
22
|
+
|
|
23
|
+
A `.quackage-templates.json` file is a JSON object where each key is a fileset name:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"my-fileset": {
|
|
28
|
+
"Hash": "MyFileset",
|
|
29
|
+
"Name": "My Fileset",
|
|
30
|
+
"Description": "Creates a standard module scaffold.",
|
|
31
|
+
"Files": [
|
|
32
|
+
{
|
|
33
|
+
"Hash": "IndexJs",
|
|
34
|
+
"Path": "source/index.js",
|
|
35
|
+
"Content": "module.exports = {};\n"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"Templates": {
|
|
39
|
+
"CustomHelper": "some reusable template content"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
File paths and content support the Pict template engine, so you can use expressions like `{~Data:Scope~}` to inject the scope name or other context.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# boilerplate
|
|
2
|
+
|
|
3
|
+
Generate files from a named template fileset.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack boilerplate <fileset> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `boil`, `bp`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `fileset` | The name of the template fileset to generate (required) |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-s, --scope <scope>` | `Default` | A scope identifier passed into templates as a variable |
|
|
24
|
+
| `-f, --force` | | Force overwrite existing files |
|
|
25
|
+
|
|
26
|
+
## Behavior
|
|
27
|
+
|
|
28
|
+
1. Loads template filesets from all three sources (built-in, project `.quackage-templates.json`, home `~/.quackage-templates.json`) and merges them
|
|
29
|
+
2. Looks up the requested fileset by name
|
|
30
|
+
3. For each file in the fileset:
|
|
31
|
+
- Resolves the file path through the Pict template engine (paths can contain template expressions)
|
|
32
|
+
- Creates any necessary parent directories
|
|
33
|
+
- If the file already exists and `--force` is not set: warns and suggests backup/delete commands
|
|
34
|
+
- If the file does not exist (or `--force` is set): renders the content through the template engine and writes it
|
|
35
|
+
4. Templates have access to the scope, package.json data, and quackage configuration
|
|
36
|
+
|
|
37
|
+
## Template Variables
|
|
38
|
+
|
|
39
|
+
Templates can reference:
|
|
40
|
+
|
|
41
|
+
- `{~Data:Scope~}` -- the `--scope` value
|
|
42
|
+
- `{~Data:FileSetName~}` -- the fileset key
|
|
43
|
+
- Package.json data through `AppData.Package`
|
|
44
|
+
- `QUACKAGEPROJECTNAMECAP` -- the capitalized project name
|
|
45
|
+
- `QUACKAGESCOPE` -- the scope value (in file paths)
|
|
46
|
+
|
|
47
|
+
## Example
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Generate a unit test boilerplate scoped to "User"
|
|
51
|
+
quack boilerplate unit-test --scope User
|
|
52
|
+
|
|
53
|
+
# Overwrite existing files
|
|
54
|
+
quack bp unit-test --scope User --force
|
|
55
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# buildtemplates
|
|
2
|
+
|
|
3
|
+
Create template filesets from the contents of a folder. Each top-level subfolder becomes its own template fileset.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack buildtemplates <folder>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `bt`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `folder` | The folder path to scan for template content (required) |
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. Reads the target folder
|
|
22
|
+
2. Each top-level subdirectory becomes a named template fileset (the folder name is cleaned to alphanumeric characters)
|
|
23
|
+
3. Files within each subdirectory are read recursively and added to that fileset with their relative paths preserved
|
|
24
|
+
4. Top-level files (not in a subdirectory) become their own single-file filesets
|
|
25
|
+
5. If a `.quackage-templates.json` already exists in the working directory, the new filesets are merged into it
|
|
26
|
+
6. Writes the result to `.quackage-templates.json`
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
Given this folder structure:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
templates/
|
|
34
|
+
unit-test/
|
|
35
|
+
test/test.js
|
|
36
|
+
test/test-helper.js
|
|
37
|
+
service/
|
|
38
|
+
source/MyService.js
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Running:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
quack bt templates
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Produces a `.quackage-templates.json` with two filesets: `unittest` and `service`, each containing the respective files with their content and relative paths.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# listtemplates
|
|
2
|
+
|
|
3
|
+
List all available boilerplate template filesets.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack listtemplates
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `list`, `ls`, `lt`
|
|
12
|
+
|
|
13
|
+
## Behavior
|
|
14
|
+
|
|
15
|
+
1. Loads the built-in template filesets from quackage
|
|
16
|
+
2. Merges in any project-level templates from `{CWD}/.quackage-templates.json`
|
|
17
|
+
3. Merges in any user-level templates from `~/.quackage-templates.json`
|
|
18
|
+
4. Prints each fileset name and the number of templated files it contains
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
quack ls
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Output:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
unit-test ______________________________ (2 templated files)
|
|
30
|
+
pict-view ______________________________ (4 templated files)
|
|
31
|
+
service ________________________________ (3 templated files)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use the fileset name with the `boilerplate` command to generate files:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
quack bp unit-test
|
|
38
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Building
|
|
2
|
+
|
|
3
|
+
Commands for building, copying and testing your module. These are the core development workflow commands you'll use most frequently.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- [build](build.md) -- Browserify and minify your module into `dist/`
|
|
8
|
+
- [copy-files-from-to](copy-files-from-to.md) -- Copy files to a staging location
|
|
9
|
+
- [run-mocha-tests](run-mocha-tests.md) -- Run Mocha tests in TDD mode
|
|
10
|
+
|
|
11
|
+
## Typical Workflow
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Run tests
|
|
15
|
+
quack test
|
|
16
|
+
|
|
17
|
+
# Build for distribution
|
|
18
|
+
quack build
|
|
19
|
+
|
|
20
|
+
# Copy static assets to staging
|
|
21
|
+
quack copy
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The standard `npm run build` script added by `quack updatepackage` runs `npx quack build`. For pict applications, the typical build sequence is:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx quack build && npx quack copy
|
|
28
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# build
|
|
2
|
+
|
|
3
|
+
Browserify and minify your module into a `dist/` folder using Gulp.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack build
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
The build command runs one or more Gulp-based build targets. By default, quackage defines two build executions:
|
|
14
|
+
|
|
15
|
+
### Build Targets
|
|
16
|
+
|
|
17
|
+
| Target | File Label | Browsers List | Output |
|
|
18
|
+
|--------|-----------|---------------|--------|
|
|
19
|
+
| Default | *(none)* | `since 2018` | `{name}.js` / `{name}.min.js` |
|
|
20
|
+
| Compatible | `compatible.` | `> 0.01%` | `{name}.compatible.js` / `{name}.compatible.min.js` |
|
|
21
|
+
|
|
22
|
+
### Build Steps (per target)
|
|
23
|
+
|
|
24
|
+
For each build target, the command:
|
|
25
|
+
|
|
26
|
+
1. Writes `.browserslistrc` -- sets the Browserslist query for this target. Backs up any existing file to `.browserslistrc-BACKUP`
|
|
27
|
+
2. Writes `.babelrc` -- creates a Babel config with `@babel/preset-env` and source maps (only if `.babelrc` doesn't already exist)
|
|
28
|
+
3. Writes `.gulpfile-quackage-config.json` -- the Gulp configuration with entry point, output folder and file names, resolved from your `package.json` `main` field
|
|
29
|
+
4. Writes `.gulpfile-quackage.js` -- the Gulp entry point that requires the quackage gulpfile
|
|
30
|
+
5. Runs Gulp -- executes the build using the generated gulpfile
|
|
31
|
+
|
|
32
|
+
### Build Configuration
|
|
33
|
+
|
|
34
|
+
The build reads configuration from `.quackage.json` (or the defaults). Key fields:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"GulpfileConfiguration": {
|
|
39
|
+
"EntrypointInputSourceFile": "{CWD}/{package.main}",
|
|
40
|
+
"LibraryObjectName": "{PascalCaseName}",
|
|
41
|
+
"LibraryOutputFolder": "{CWD}/dist/",
|
|
42
|
+
"LibraryUniminifiedFileName": "{name}.js",
|
|
43
|
+
"LibraryMinifiedFileName": "{name}.min.js"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Customization
|
|
49
|
+
|
|
50
|
+
To customize build targets, create a `.quackage.json` in your project root and override the `GulpExecutions` array:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"GulpExecutions": [
|
|
55
|
+
{
|
|
56
|
+
"Hash": "modern",
|
|
57
|
+
"Name": "Modern browsers only",
|
|
58
|
+
"BuildFileLabel": "",
|
|
59
|
+
"BrowsersListRC": "last 2 versions"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Example
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
quack build
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Output:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
###############################[ BUILDING Default standard build. ]###############################
|
|
75
|
+
Quackage found gulp at ./node_modules/.bin/gulp ... executing build from there.
|
|
76
|
+
###############################[ BUILDING Default standard build. ]###############################
|
|
77
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# copy-files-from-to
|
|
2
|
+
|
|
3
|
+
Copy files to a staging location using the `copy-files-from-to` utility.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack copy-files-from-to
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `copy`, `cp`
|
|
12
|
+
|
|
13
|
+
## Behavior
|
|
14
|
+
|
|
15
|
+
Executes the `copy-files-from-to` npm package, which reads its own configuration from `copyFiles.json` or `copyFilesSettings` in your `package.json`. Quackage simply locates and runs the binary -- the copy rules themselves are defined in your project.
|
|
16
|
+
|
|
17
|
+
See the [copy-files-from-to documentation](https://github.com/nicedreams/copy-files-from-to) for configuration details.
|
|
18
|
+
|
|
19
|
+
## Common Use
|
|
20
|
+
|
|
21
|
+
This command is typically run after `build` to copy static assets (HTML, CSS, images) alongside the compiled JavaScript:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
quack build && quack copy
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The `WatchSettings` in the quackage default configuration monitors `./html`, `./css` and `./assets` folders and runs `npx quack copy` when files change.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Copy files according to your copyFiles configuration
|
|
33
|
+
quack cp
|
|
34
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# run-mocha-tests
|
|
2
|
+
|
|
3
|
+
Run Mocha tests in TDD mode with the spec reporter.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack run-mocha-tests [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `test`
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
| Option | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `-g, --grep <expression>` | A grep search expression to filter which tests run |
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
1. Locates the Mocha binary using the standard executable resolution order (CWD, quackage package, git repo)
|
|
22
|
+
2. Runs Mocha with:
|
|
23
|
+
- `-u tdd` -- TDD interface (suite/test)
|
|
24
|
+
- `-R spec` -- spec reporter
|
|
25
|
+
- `--exit` -- (only when using `--grep`) force exit after tests complete
|
|
26
|
+
3. If `--grep` is provided, only tests matching the expression are executed
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Run all tests
|
|
32
|
+
quack test
|
|
33
|
+
|
|
34
|
+
# Run only tests matching "User"
|
|
35
|
+
quack test --grep User
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This is equivalent to the standard npm script added by `updatepackage`:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm test
|
|
42
|
+
# runs: npx mocha -u tdd -R spec
|
|
43
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Compiling
|
|
2
|
+
|
|
3
|
+
Commands for compiling schema definitions and assembling view configurations. These commands transform source artifacts into JSON structures consumed by the Meadow ORM and Pict view system.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- [stricture-compile](stricture-compile.md) -- Compile Stricture DDL into a Meadow schema
|
|
8
|
+
- [stricture-legaacy](stricture-legaacy.md) -- Run a legacy Stricture command
|
|
9
|
+
- [assemble_json_views](assemble_json_views.md) -- Assemble Pict JSON view configurations from HTML/template files
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
### Stricture
|
|
14
|
+
|
|
15
|
+
Stricture is the schema definition language for Meadow (the Retold ORM layer). The `stricture-compile` and `stricture-legaacy` commands provide quackage integration points for compiling Stricture DDL files into the JSON schema format Meadow expects.
|
|
16
|
+
|
|
17
|
+
> Note: Both Stricture commands are currently placeholder stubs awaiting full implementation. They accept arguments and options but do not yet perform compilation.
|
|
18
|
+
|
|
19
|
+
### Pict View Assembly
|
|
20
|
+
|
|
21
|
+
The `assemble_json_views` command scans a folder of HTML or template files and generates the JSON view configuration objects that the Pict view system expects. This eliminates the need to hand-write view JSON for simple template-based views.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# assemble_json_views
|
|
2
|
+
|
|
3
|
+
Assemble Pict JSON view configurations from a folder of HTML or template files.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack assemble_json_views <folder> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `ajv`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `folder` | The folder path to scan for view template files (required) |
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
| Option | Default | Description |
|
|
22
|
+
|--------|---------|-------------|
|
|
23
|
+
| `-p, --prefix <prefix>` | `Default` | A prefix for the generated view set identifiers |
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
1. Resolves the folder path relative to the current working directory
|
|
28
|
+
2. Recursively scans all files in the folder (and subfolders)
|
|
29
|
+
3. For each file, generates a Pict view JSON object containing:
|
|
30
|
+
- `ViewIdentifier` -- `{Prefix}-{CleanFileName}-View`
|
|
31
|
+
- `DefaultRenderable` -- `{Prefix}-{CleanFileName}-Renderable`
|
|
32
|
+
- `DefaultDestinationAddress` -- `#{Prefix}-Content-Container`
|
|
33
|
+
- `Templates` -- array with one entry containing the file content as the template
|
|
34
|
+
- `Renderables` -- array linking the renderable hash to the template hash
|
|
35
|
+
- `AutoRender` -- set to `false`
|
|
36
|
+
4. Writes the complete view set to `{Prefix}-View-Templates.json` in the working directory
|
|
37
|
+
|
|
38
|
+
## Output Format
|
|
39
|
+
|
|
40
|
+
Each generated view follows this structure:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"Prefix-FileName-View": {
|
|
45
|
+
"ViewIdentifier": "Prefix-FileName-View",
|
|
46
|
+
"DefaultRenderable": "Prefix-FileName-Renderable",
|
|
47
|
+
"DefaultDestinationAddress": "#Prefix-Content-Container",
|
|
48
|
+
"AutoRender": false,
|
|
49
|
+
"Templates": [
|
|
50
|
+
{
|
|
51
|
+
"Hash": "Prefix-FileName-Content-Template",
|
|
52
|
+
"Template": "...file contents..."
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"Renderables": [
|
|
56
|
+
{
|
|
57
|
+
"RenderableHash": "Prefix-FileName-Renderable",
|
|
58
|
+
"TemplateHash": "Prefix-FileName-Content-Template"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Example
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Scan ./views and generate Default-View-Templates.json
|
|
69
|
+
quack ajv ./views
|
|
70
|
+
|
|
71
|
+
# Use a custom prefix
|
|
72
|
+
quack ajv ./views --prefix MyApp
|
|
73
|
+
# Produces MyApp-View-Templates.json
|
|
74
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# stricture-compile
|
|
2
|
+
|
|
3
|
+
Compile Stricture DDL into a Meadow schema file.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
quack stricture-compile <output_folder> [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Aliases: `scomp`
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
| Argument | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `output_folder` | The folder in which to generate the compiled schema (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 compilation. The implementation will compile Stricture DDL definitions into the JSON schema format consumed by Meadow.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
quack scomp ./schema
|
|
33
|
+
```
|