create-vite-hyperapp 1.0.0 → 1.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 CHANGED
@@ -1 +1,34 @@
1
1
  # create-vite-hyperapp
2
+
3
+ Quickly scaffold new web-frontend projects using the [Hyperapp](https://hyperapp.dev) microframework, using the [Vite](https://vitejs.dev) bundler.
4
+
5
+ ## Usage
6
+
7
+ With your shell in the folder _under which_ you would like to create your new project folder, run `npm create vite-hyperapp` and answer the questions.
8
+
9
+ To skip questions and do the entire setup directly in the command line, use the options:
10
+
11
+ ```
12
+ Usage: npm create vite-hyperapp -- [TARGET_DIR] [OPTIONS]
13
+
14
+ Options:
15
+ -t, --typescript Use typescript
16
+ -s, --ssr Use server-side rendering
17
+ -n, --no-prompt Just do it, no questions asked
18
+ -h, --help Show this message
19
+
20
+ If no target dir is specified, the project name will be used.
21
+ If --no-prompt option is used, project name will be target dir
22
+ Default project-name/target-dir is 'hyperapp-project'
23
+ ```
24
+
25
+ ## About the scaffolds
26
+
27
+ There are four basic templates that can be scaffolded up, depending on wether you want to use Typescript or not, and if you want to scaffold your project for SSR or not.
28
+
29
+ The vite-hyperapp connection is provided by [vite-plugin-hyperapp](https://github.com/zaceno/vite-plugin-hyperapp).
30
+
31
+ The SSR scaffolds are based directly on Vite's SSR docs for setting up a server with SSR support.
32
+
33
+ All templates have their views written in JSX (or TSX, for the TS-templates), but you can just as easily install a view-system of your preference (or use hyperapp's builtin `h` and `text`). Just name your files with `.js` or `.ts` extensions instead of `.jsx`.
34
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-vite-hyperapp",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "description": "\"Scaffold a project quickly with Hyperapp and Vite\"",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -8,9 +8,11 @@
8
8
  "build": "vite build",
9
9
  "preview": "vite preview"
10
10
  },
11
+ "dependencies": {
12
+ "hyperapp": "^2.0.22"
13
+ },
11
14
  "devDependencies": {
12
- "hyperapp": "^2.0.22",
13
- "vite": "^4.4.5",
14
- "vite-plugin-hyperapp": "^1.0.3"
15
+ "vite": "^4.5.14",
16
+ "vite-plugin-hyperapp": "^1.2.0"
15
17
  }
16
18
  }
@@ -11,11 +11,11 @@
11
11
  "preview": "NODE_ENV=production node server"
12
12
  },
13
13
  "devDependencies": {
14
- "hyperapp": "^2.0.22",
15
- "vite": "^4.4.5",
16
- "vite-plugin-hyperapp": "^1.0.3"
14
+ "vite": "^4.5.14",
15
+ "vite-plugin-hyperapp": "^1.2.0"
17
16
  },
18
17
  "dependencies": {
18
+ "hyperapp": "^2.0.22",
19
19
  "compression": "^1.7.4",
20
20
  "express": "^4.19.2",
21
21
  "sirv": "^2.0.4"
@@ -8,10 +8,12 @@
8
8
  "build": "tsc && vite build",
9
9
  "preview": "vite preview"
10
10
  },
11
+ "dependencies": {
12
+ "hyperapp": "^2.0.22"
13
+ },
11
14
  "devDependencies": {
12
- "hyperapp": "^2.0.22",
13
15
  "typescript": "^5.0.2",
14
- "vite": "^4.4.5",
15
- "vite-plugin-hyperapp": "^1.0.3"
16
+ "vite": "^4.5.14",
17
+ "vite-plugin-hyperapp": "^1.2.0"
16
18
  }
17
19
  }
@@ -1 +1,2 @@
1
1
  /// <reference types="vite/client" />
2
+ /// <reference types="vite-plugin-hyperapp/jsx" />
@@ -21,7 +21,8 @@
21
21
 
22
22
  /* Necessary for tsx to work with vite-plugin-hyperapp*/
23
23
  "jsx": "preserve",
24
- "jsxImportSource": "vite-plugin-hyperapp"
24
+ "jsxFactory": "jsx",
25
+ "jsxFragmentFactory": "jsxFragment"
25
26
  },
26
27
  "include": ["src"]
27
28
  }
@@ -11,12 +11,12 @@
11
11
  "preview": "NODE_ENV=production node server"
12
12
  },
13
13
  "devDependencies": {
14
- "hyperapp": "^2.0.22",
15
14
  "typescript": "^5.0.2",
16
- "vite": "^4.4.5",
17
- "vite-plugin-hyperapp": "^1.0.3"
15
+ "vite": "^4.5.14",
16
+ "vite-plugin-hyperapp": "^1.2.0"
18
17
  },
19
18
  "dependencies": {
19
+ "hyperapp": "^2.0.22",
20
20
  "compression": "^1.7.4",
21
21
  "express": "^4.19.2",
22
22
  "sirv": "^2.0.4"
@@ -1 +1,2 @@
1
1
  /// <reference types="vite/client" />
2
+ /// <reference types="vite-plugin-hyperapp/jsx" />
@@ -21,7 +21,8 @@
21
21
 
22
22
  /* Necessary for tsx to work with vite-plugin-hyperapp*/
23
23
  "jsx": "preserve",
24
- "jsxImportSource": "vite-plugin-hyperapp"
24
+ "jsxFactory": "jsx",
25
+ "jsxFragmentFactory": "jsxFragment"
25
26
  },
26
27
  "include": ["src"]
27
28
  }