@craftland/ggpm 0.0.0-stage → 0.1.0
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 +31 -3
- package/bin/ggpm.cjs +12 -0
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# GG Package Manager
|
|
2
|
+
|
|
3
|
+
Package Manager for Craftland Packages
|
|
4
|
+
|
|
5
|
+
## Install the CLI
|
|
6
|
+
|
|
7
|
+
Once the CLI is published, install it with Node.js and npm:
|
|
8
|
+
|
|
9
|
+
```powershell
|
|
10
|
+
npm install -g @craftland/ggpm
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The first version supports `ggpm -v` and `ggpm --version`. Both print the
|
|
14
|
+
installed CLI version, such as `0.1.0`.
|
|
15
|
+
|
|
16
|
+
npm distributes the CLI. The separate `ggpm-registry` GitHub repo is the
|
|
17
|
+
planned home for `registry.json` and the Craftland package ZIPs.
|
|
18
|
+
|
|
19
|
+
## Planned commands
|
|
20
|
+
|
|
21
|
+
- `ggpm list` shows available packages and their latest versions.
|
|
22
|
+
- `ggpm init` creates `ggpackage.json` at the root of a Craftland project.
|
|
23
|
+
- `ggpm install` installs the packages declared in the project manifest.
|
|
24
|
+
- `ggpm install <package-name> [version]` installs a package and records it in
|
|
25
|
+
the project manifest. Omitting the version selects the latest stable release.
|
|
26
|
+
- `ggpm update` updates installed packages to match the versions in the
|
|
27
|
+
project manifest.
|
|
28
|
+
- `ggpm publish` uploads a package ZIP and updates the registry index.
|
|
29
|
+
|
|
30
|
+
## Note
|
|
31
|
+
Reference example packages for a package
|
package/bin/ggpm.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { version } = require('../package.json');
|
|
4
|
+
|
|
5
|
+
const [flag, ...extraArgs] = process.argv.slice(2);
|
|
6
|
+
|
|
7
|
+
if (extraArgs.length === 0 && (flag === '-v' || flag === '--version')) {
|
|
8
|
+
console.log(version);
|
|
9
|
+
} else {
|
|
10
|
+
console.error('Usage: ggpm -v | ggpm --version');
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftland/ggpm",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Package manager for Craftland projects",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ggpm": "bin/ggpm.cjs"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/ggpm.cjs"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
}
|
|
14
|
+
}
|