@haxtheweb/create 9.0.5 → 9.0.8
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 +43 -7
- package/dist/create.js +406 -234
- package/dist/lib/statements.js +70 -0
- package/dist/{utils.js → lib/utils.js} +0 -1
- package/dist/templates/webcomponent/hax/.surgeignore +1 -0
- package/dist/templates/webcomponent/hax/.travis.yml +17 -0
- package/dist/templates/webcomponent/hax/README.md +3 -2
- package/dist/templates/webcomponent/hax/index.html +4 -3
- package/dist/templates/webcomponent/hax/locales/webcomponent.ar.haxProperties.json +16 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.ar.json +3 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.es.haxProperties.json +16 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.es.json +3 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.hi.haxProperties.json +16 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.hi.json +3 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.zh.haxProperties.json +16 -0
- package/dist/templates/webcomponent/hax/locales/webcomponent.zh.json +3 -0
- package/dist/templates/webcomponent/hax/package.json +32 -14
- package/dist/templates/webcomponent/hax/test/webcomponent.test.js +21 -0
- package/dist/templates/webcomponent/hax/web-dev-server.config.mjs +2 -0
- package/dist/templates/webcomponent/hax/{src/webcomponent.js → webcomponent.js} +31 -6
- package/package.json +8 -11
- /package/dist/{art.js → lib/art.js} +0 -0
package/README.md
CHANGED
|
@@ -1,20 +1,56 @@
|
|
|
1
1
|
# HAX The CLI
|
|
2
2
|
Rapidly build web components for the Web that work with HAX. HAX The Web's CLI tools empower you to rapidly..
|
|
3
|
-
- start making Lit based web components using the HAX design system and tools
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
```bash
|
|
5
|
+
# this allows you to then use hax command
|
|
6
|
+
npm install @haxtheweb/create --global
|
|
7
|
+
# then run
|
|
8
|
+
hax
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
# Commands
|
|
12
|
+
|
|
13
|
+
## Default / global / new context
|
|
14
|
+
- `hax` - fun ascii art and interactive CLI (via [clack](https://www.clack.cc/) )
|
|
15
|
+
- `hax --name my-element --y` - Make a new HAX capable, i18n wired, Design system (DDD) driven web component
|
|
16
|
+
- if in a monorepo root, will place in correct location / inherit settings
|
|
17
|
+
- `hax --type haxsite --name mysite --y` - create a new HAXsite (HAXcms, single site)
|
|
18
|
+
|
|
19
|
+
## Site context
|
|
20
|
+
- listing stats
|
|
21
|
+
- launch site
|
|
22
|
+
- publish to surge.sh (if installed)
|
|
23
|
+
|
|
24
|
+
## web component context
|
|
25
|
+
- launch element
|
|
9
26
|
|
|
10
|
-
# Usage
|
|
27
|
+
# Alternative Usage
|
|
11
28
|
|
|
12
29
|
```bash
|
|
30
|
+
# also this will invoke 1x
|
|
13
31
|
npx @haxtheweb/create
|
|
14
|
-
#
|
|
32
|
+
# this is same as above, better windows CLI support
|
|
15
33
|
npm init @haxtheweb
|
|
16
34
|
```
|
|
17
35
|
|
|
36
|
+
## Usage in other programs
|
|
37
|
+
https://stackoverflow.com/questions/69208298/use-node-bins-without-installing-the-package-globally explains it but you should be able to use the CLI as part of another project as follows:
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"scripts": {
|
|
41
|
+
"hax": "hax"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# script creating a new element called my-element w/ all defaults
|
|
48
|
+
npm run hax -- --name my-element --y
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Windows problems?
|
|
52
|
+
Try setting a different cache path to load from `npm config set cache C:\tmp\nodejs\npm-cache --global`
|
|
53
|
+
|
|
18
54
|
Follow the prompts and let's HAX the Web together!
|
|
19
55
|
|
|
20
56
|
## Web component
|