@haxtheweb/create 9.0.18 → 9.0.20

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 CHANGED
@@ -63,12 +63,18 @@ Commands:
63
63
  help [command] display help for command
64
64
  ```
65
65
 
66
- ## Site context
66
+ ## Manual
67
+
68
+ ### Linux / macOS
69
+
70
+ Run `man hax` to get detailed manual.
71
+
72
+ ## Site context
67
73
  - listing stats
68
74
  - launch site
69
75
  - publish to surge.sh (if installed)
70
76
 
71
- ## web component context
77
+ ## Web component context
72
78
  - launch element
73
79
 
74
80
  # Alternative Usage
@@ -83,7 +89,6 @@ npm init @haxtheweb
83
89
  "scripts": {
84
90
  "hax": "hax"
85
91
  }
86
- }
87
92
  ```
88
93
 
89
94
  ```bash
@@ -94,6 +99,15 @@ npm run hax -- --name my-element --y
94
99
  ## Windows problems?
95
100
  Try setting a different cache path to load from `npm config set cache C:\tmp\nodejs\npm-cache --global`
96
101
 
102
+ If you wish to use PowerShell over Command Prompt, you may need to change your execution policy to allow scripts using the `Set-ExecutionPolicy` command with the `-ExecutionPolicy` and `-Scope` parameters. You should **not** need to do this if you are using Command Prompt.
103
+
104
+ ```powershell
105
+ # To see your current execution policy
106
+ Get-ExecutionPolicy
107
+ ```
108
+
109
+ `Set-ExecutionPolicy` command documentation: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.4
110
+
97
111
  Follow the prompts and let's HAX the Web together!
98
112
 
99
113
  ## Web component
package/dist/create.js CHANGED
@@ -61,7 +61,7 @@ async function main() {
61
61
  commandRun.arguments.action = action;
62
62
  commandRun.options.skip = true;
63
63
  }
64
- }).option('--path <char>', 'path the project should be created in').option('--import-site <char>', 'URL of site to import').option('--import-structure <char>', `import method to use:\n\rpressbooksToSite\n\relmslnToSite\n\rhaxcmsToSite\n\rnotionToSite\n\rgitbookToSite\n\revolutionToSite\n\rhtmlToSite\n\rdocxToSite`).option('--name <char>', 'name of the site (when creating a new one)').option('--domain <char>', 'published domain name').option('--node-op <char>', 'node operation to perform').option('--no-i', 'prevent interactions / sub-process, good for scripting').option('--to-file <char>', 'redirect command output to a file').option('--item-import <char>', 'import items from a file / site').version(await HAXCMS.getHAXCMSVersion());
64
+ }).option('--path <char>', 'path the project should be created in').option('--import-site <char>', 'URL of site to import').option('--import-structure <char>', `import method to use:\n\rpressbooksToSite\n\relmslnToSite\n\rhaxcmsToSite\n\rnotionToSite\n\rgitbookToSite\n\revolutionToSite\n\rhtmlToSite\n\rdocxToSite`).option('--name <char>', 'name of the site (when creating a new one)').option('--domain <char>', 'published domain name').option('--node-op <char>', 'node operation to perform').option('--no-i', 'prevent interactions / sub-process, good for scripting').option('--title-scrape <char>', 'CSS Selector for `title` in resource').option('--content-scrape <char>', 'CSS Selector for `body` in resource').option('--to-file <char>', 'redirect command output to a file').option('--item-import <char>', 'import items from a file / site').version(await HAXCMS.getHAXCMSVersion());
65
65
  let siteNodeOps = (0, _site.siteNodeOperations)();
66
66
  for (var i in siteNodeOps) {
67
67
  _commander.program.option(`--${(0, _utils.camelToDash)(siteNodeOps[i].value)} <char>`, `${siteNodeOps[i].label}`);
@@ -351,7 +351,7 @@ async function main() {
351
351
  results
352
352
  }) => {
353
353
  let themes = await (0, _site.siteThemeList)();
354
- if (!commandRun.options.theme) {
354
+ if (results.type === "site" && !commandRun.options.theme) {
355
355
  // support having no theme but autoselecting
356
356
  if (!commandRun.options.auto && !commandRun.options.skip) {
357
357
  commandRun.options.theme = themes[0];
@@ -0,0 +1,153 @@
1
+ .TH HAX\-CREATE 1 hax 9.0.18 "HAX COMMAND INTERFACE MANUAL"
2
+
3
+ .SH NAME
4
+ hax \- a tool to create HAX websites and web components quickly.
5
+
6
+ .SH SYNOPSIS
7
+ hax [options] [command]
8
+
9
+ .SH DESCRIPTION
10
+ HAX seeks to be the smallest possible back-end CMS to make HAX work and be able to build websites with it. Leveraging JSON Outline Schema, HAX is able to author multiple pages, which it then writes onto the file system. This way a slim server layer is just for basic authentication, knowing how to save files, and placing them in version control.
11
+
12
+ This command line tool can be used to create and modify two different HAX based file structures. Web components (essentially custom HTML tags) using Lit or HAX Single-Sites (a single website editable in the browser with the CMS tools)
13
+
14
+ .SH COMMANDS
15
+ .PP
16
+ .B start
17
+ \- Interactive program to pick options
18
+ .PP
19
+ .B site
20
+ [options] [action] \- Create a HAX website
21
+ .PP
22
+ .B webcomponent
23
+ [options] [name] \- Create Lit based web components, with HAX recommendations
24
+ .PP
25
+ .B help
26
+ [command] \- Display help for command
27
+
28
+ .SH OPTIONS
29
+ .TP
30
+ \--v
31
+ Verbose output
32
+ .TP
33
+ \--debug
34
+ Output for developers
35
+ .TP
36
+ \--format [format]
37
+ Output format\; json (default), yaml
38
+ .TP
39
+ \--path [path]
40
+ Where to perform operation
41
+ .TP
42
+ \--npm\-client [client]
43
+ NPM client to use (must be installed); npm (default), yarn, pnpm
44
+ .TP
45
+ \--y, \--auto
46
+ Yes to all questions
47
+ .TP
48
+ \--skip
49
+ Skip extras (e.g. animations) in tool
50
+ .TP
51
+ \--quiet
52
+ Remove console logging
53
+ .TP
54
+ \--no\-i
55
+ Prevent interactions / sub\-process, good for scripting
56
+ .TP
57
+ \--to\-file [char]
58
+ Redirect command output to a file
59
+ .TP
60
+ \--org [organization]
61
+ Organization for package.json
62
+ .TP
63
+ \--author [author]
64
+ Author for site / package.json
65
+ .TP
66
+ \--writeHaxProperties
67
+ Write haxProperties for the element
68
+ .TP
69
+ \--import\-site [url]
70
+ URL of site to import
71
+ .TP
72
+ \--import\-structure [method]
73
+ Import method to use: pressbooksToSite | elsmlnToSite | haxcmsToSite | notionToSite | gitbookToSite | evolutionToSite | htmlToSite | docxToSite
74
+ .TP
75
+ \--node\-op [operation]
76
+ Node operation to perform
77
+ .TP
78
+ \--item\-id [id]
79
+ Node ID to operate on
80
+ .TP
81
+ \--name [name]
82
+ Name of the project
83
+ .TP
84
+ \--domain [name]
85
+ Published domain name
86
+ .TP
87
+ \--items\-import [char]
88
+ Import items from a file / site
89
+ .TP
90
+ \--title [title]
91
+ Title
92
+ .TP
93
+ \--content [content]
94
+ Page content
95
+ .TP
96
+ \--slug [slug]
97
+ Path (slug)
98
+ .TP
99
+ \--published [status]
100
+ Publishing status
101
+ .TP
102
+ \--tags [tag]
103
+ Tags
104
+ .TP
105
+ \--parent [parent]
106
+ Parent
107
+ .TP
108
+ \--order [order]
109
+ Order
110
+ .TP
111
+ \--theme [theme]
112
+ Theme
113
+ .TP
114
+ \--hide\-in\-menu [char]
115
+ Hide in menu
116
+ .TP
117
+ \-h, \--help
118
+ Display help for command
119
+
120
+ .SH EXAMPLES
121
+ .TP
122
+ .B hax start
123
+ Navigatable interface
124
+ .TP
125
+ .B hax webcomponent my-element --y
126
+ Make a new HAX capable, i18n wired, design system (DDD) driven web component
127
+ .TP
128
+ .B hax site mysite --y
129
+ Create a new HAXsite (HAXcms, single site)
130
+
131
+ .SH BUGS
132
+ Bugs can be viewed at GitHub Issues: https://github.com/haxtheweb/issues/issues
133
+
134
+ Bugs can also be submitted through Merlin on a HAX Site (in the browser) by typing "Issue" to jump start a report!
135
+
136
+ .SH EXTRA
137
+ .PP
138
+ .B Website:
139
+ https://haxtheweb.org/
140
+ .PP
141
+ .B CLI Repository:
142
+ https://github.com/haxtheweb/create
143
+ .PP
144
+ .B Web Components Repository:
145
+ https://github.com/haxtheweb/webcomponents
146
+
147
+ .SH AUTHORS
148
+ .PP
149
+ .B CLI Contributors:
150
+ https://github.com/haxtheweb/create/graphs/contributors
151
+ .PP
152
+ .B Web Components Contributors:
153
+ https://github.com/haxtheweb/webcomponents/graphs/contributors
@@ -27,9 +27,9 @@
27
27
  "test:watch": "web-test-runner test/**/*.test.js --node-resolve --watch"
28
28
  },
29
29
  "dependencies": {
30
- "lit": "^3.2.0",
31
- "@haxtheweb/d-d-d": "^9.0.13",
32
- "@haxtheweb/i18n-manager": "^9.0.13"
30
+ "lit": "^3.2.1",
31
+ "@haxtheweb/d-d-d": "^9.0.21",
32
+ "@haxtheweb/i18n-manager": "^9.0.18"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@babel/preset-env": "^7.16.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haxtheweb/create",
3
- "version": "9.0.18",
3
+ "version": "9.0.20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -26,6 +26,9 @@
26
26
  "dev": "nodemon --watch src",
27
27
  "haxcms-nodejs": "haxcms-nodejs"
28
28
  },
29
+ "man": [
30
+ "./dist/docs/hax.1"
31
+ ],
29
32
  "bin": {
30
33
  "create-haxtheweb": "./dist/create.js",
31
34
  "hax": "./dist/create.js"