create-nodepress-app 1.0.0 → 1.0.1
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 +12 -7
- package/bin/nodepress.js +14 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-nodepress-app
|
|
2
2
|
|
|
3
|
-
Scaffold a self-hosted [NodePress](https://
|
|
3
|
+
Scaffold a self-hosted [NodePress](https://nodepress.buildwithkode.com) headless CMS project in one command.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npx nodepress
|
|
6
|
+
npx create-nodepress-app my-cms
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## What it does
|
|
@@ -22,15 +22,15 @@ npx nodepress new my-cms
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npx nodepress
|
|
26
|
-
npx nodepress --version
|
|
27
|
-
npx nodepress --help
|
|
25
|
+
npx create-nodepress-app <project-name>
|
|
26
|
+
npx create-nodepress-app --version
|
|
27
|
+
npx create-nodepress-app --help
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Quick start
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npx nodepress
|
|
33
|
+
npx create-nodepress-app my-cms
|
|
34
34
|
cd my-cms
|
|
35
35
|
|
|
36
36
|
# Option A — Docker (recommended)
|
|
@@ -48,6 +48,11 @@ cd frontend && npm run dev
|
|
|
48
48
|
|
|
49
49
|
On first load the admin panel redirects to `/setup` where you create the first admin account.
|
|
50
50
|
|
|
51
|
+
## Links
|
|
52
|
+
|
|
53
|
+
- Website: [nodepress.buildwithkode.com](https://nodepress.buildwithkode.com)
|
|
54
|
+
- GitHub: [github.com/buildwithkode/nodepress](https://github.com/buildwithkode/nodepress)
|
|
55
|
+
|
|
51
56
|
## License
|
|
52
57
|
|
|
53
58
|
MIT
|
package/bin/nodepress.js
CHANGED
|
@@ -7,17 +7,18 @@ const HELP = `
|
|
|
7
7
|
NodePress CLI
|
|
8
8
|
|
|
9
9
|
Usage:
|
|
10
|
-
npx nodepress
|
|
11
|
-
npx nodepress --version
|
|
12
|
-
npx nodepress --help
|
|
10
|
+
npx create-nodepress-app <project-name> Scaffold a new NodePress project
|
|
11
|
+
npx create-nodepress-app --version Show version
|
|
12
|
+
npx create-nodepress-app --help Show this help
|
|
13
13
|
|
|
14
14
|
Examples:
|
|
15
|
-
npx nodepress
|
|
16
|
-
npx nodepress
|
|
15
|
+
npx create-nodepress-app my-website
|
|
16
|
+
npx create-nodepress-app company-cms
|
|
17
17
|
`;
|
|
18
18
|
|
|
19
19
|
switch (command) {
|
|
20
20
|
case 'new':
|
|
21
|
+
// Legacy: npx create-nodepress-app new <name>
|
|
21
22
|
require('../src/new')(args[0]);
|
|
22
23
|
break;
|
|
23
24
|
case '--version':
|
|
@@ -30,7 +31,12 @@ switch (command) {
|
|
|
30
31
|
console.log(HELP);
|
|
31
32
|
break;
|
|
32
33
|
default:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// Primary usage: npx create-nodepress-app <project-name>
|
|
35
|
+
if (!command.startsWith('-')) {
|
|
36
|
+
require('../src/new')(command);
|
|
37
|
+
} else {
|
|
38
|
+
console.error(`\n Unknown option: "${command}"`);
|
|
39
|
+
console.log(HELP);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
36
42
|
}
|