@batijs/cli 0.0.25 → 0.0.27

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.
Files changed (60) hide show
  1. package/README.md +3 -3
  2. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +1 -1
  3. package/dist/boilerplates/@batijs/edgedb/{package-NAEM3YOJ.js → package-MC7EAK66.js} +4 -4
  4. package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
  5. package/dist/boilerplates/@batijs/express/files/express-entry.ts +124 -124
  6. package/dist/boilerplates/@batijs/express/{package-VWSKNQQS.js → package-PUCXLRMN.js} +4 -4
  7. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
  8. package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +88 -88
  9. package/dist/boilerplates/@batijs/hattip/{package-PAHNC63I.js → package-WBQQVSZU.js} +4 -4
  10. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  11. package/dist/boilerplates/@batijs/prisma/{package-42T5MPMS.js → package-MYVHPWDR.js} +3 -3
  12. package/dist/boilerplates/@batijs/react/files/$package.json.js +12 -0
  13. package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +12 -0
  14. package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +17 -0
  15. package/dist/boilerplates/@batijs/react/files/assets/logo.svg +36 -0
  16. package/dist/boilerplates/@batijs/react/files/components/Link.tsx +15 -0
  17. package/dist/boilerplates/@batijs/react/files/layouts/HeadDefault.tsx +22 -0
  18. package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +87 -0
  19. package/dist/boilerplates/@batijs/react/files/layouts/style.css +29 -0
  20. package/dist/boilerplates/@batijs/react/files/pages/+config.h.ts +18 -0
  21. package/dist/boilerplates/@batijs/react/files/pages/_error/+Page.tsx +22 -0
  22. package/dist/boilerplates/@batijs/react/files/pages/index/+Page.tsx +22 -0
  23. package/dist/boilerplates/@batijs/react/files/pages/index/Counter.tsx +18 -0
  24. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+Page.tsx +17 -0
  25. package/dist/boilerplates/@batijs/react/files/pages/star-wars/@id/+onBeforeRender.ts +27 -0
  26. package/dist/boilerplates/@batijs/react/files/pages/star-wars/filterMovieData.ts +11 -0
  27. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+Page.tsx +22 -0
  28. package/dist/boilerplates/@batijs/react/files/pages/star-wars/index/+onBeforeRender.ts +80 -0
  29. package/dist/boilerplates/@batijs/react/files/pages/star-wars/types.ts +13 -0
  30. package/dist/boilerplates/@batijs/react/package-L3XWD3PG.js +70 -0
  31. package/dist/boilerplates/@batijs/shared/files/package.json +2 -2
  32. package/dist/boilerplates/@batijs/shared/files/tsconfig.json +18 -18
  33. package/dist/boilerplates/@batijs/shared/files/vite.config.ts +5 -5
  34. package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
  35. package/dist/boilerplates/@batijs/solid/files/assets/logo.svg +36 -36
  36. package/dist/boilerplates/@batijs/solid/files/components/Link.tsx +14 -14
  37. package/dist/boilerplates/@batijs/solid/files/layouts/HeadDefault.tsx +22 -22
  38. package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +87 -87
  39. package/dist/boilerplates/@batijs/solid/files/layouts/style.css +29 -29
  40. package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +13 -13
  41. package/dist/boilerplates/@batijs/solid/files/pages/_error/+Page.tsx +18 -18
  42. package/dist/boilerplates/@batijs/solid/files/pages/index/+Page.tsx +21 -21
  43. package/dist/boilerplates/@batijs/solid/files/pages/index/Counter.tsx +18 -18
  44. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+Page.tsx +14 -14
  45. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+onBeforeRender.ts +27 -27
  46. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/filterMovieData.ts +11 -11
  47. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+Page.tsx +22 -22
  48. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+onBeforeRender.ts +80 -80
  49. package/dist/boilerplates/@batijs/solid/files/pages/star-wars/types.ts +13 -13
  50. package/dist/boilerplates/@batijs/solid/{package-DVZ6BETH.js → package-MRKOMCUY.js} +2 -2
  51. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
  52. package/dist/boilerplates/@batijs/tailwindcss/files/layouts/tailwind.css +2 -2
  53. package/dist/boilerplates/@batijs/tailwindcss/files/postcss.config.js +6 -6
  54. package/dist/boilerplates/@batijs/tailwindcss/files/tailwind.config.js +8 -8
  55. package/dist/boilerplates/@batijs/tailwindcss/{package-7CSFX2AA.js → package-42PZAQG7.js} +2 -2
  56. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  57. package/dist/boilerplates/@batijs/telefunc/{package-42IE3DIX.js → package-CWDTGB4Z.js} +3 -3
  58. package/dist/boilerplates/boilerplates.json +12 -0
  59. package/dist/index.js +4 -4
  60. package/package.json +7 -7
@@ -1,22 +1,22 @@
1
- import { For } from "solid-js";
2
- import type { Movie } from "../types";
3
-
4
- export default function Page(props: { movies: Movie[] }) {
5
- return (
6
- <>
7
- <h1>Star Wars Movies</h1>
8
- <ol>
9
- <For each={props.movies}>
10
- {(movie, i) => (
11
- <li>
12
- <a href={`/star-wars/${movie.id}`}>{movie.title}</a> ({movie.release_date})
13
- </li>
14
- )}
15
- </For>
16
- </ol>
17
- <p>
18
- Source: <a href="https://star-wars.brillout.com">star-wars.brillout.com</a>.
19
- </p>
20
- </>
21
- );
22
- }
1
+ import { For } from "solid-js";
2
+ import type { Movie } from "../types";
3
+
4
+ export default function Page(props: { movies: Movie[] }) {
5
+ return (
6
+ <>
7
+ <h1>Star Wars Movies</h1>
8
+ <ol>
9
+ <For each={props.movies}>
10
+ {(movie, i) => (
11
+ <li>
12
+ <a href={`/star-wars/${movie.id}`}>{movie.title}</a> ({movie.release_date})
13
+ </li>
14
+ )}
15
+ </For>
16
+ </ol>
17
+ <p>
18
+ Source: <a href="https://star-wars.brillout.com">star-wars.brillout.com</a>.
19
+ </p>
20
+ </>
21
+ );
22
+ }
@@ -1,80 +1,80 @@
1
- export default onBeforeRender;
2
-
3
- import fetch from "cross-fetch";
4
- //import { filterMovieData } from '../filterMovieData'
5
- import type { Movie, MovieDetails } from "../types";
6
-
7
- // export { prerender }
8
-
9
- async function onBeforeRender() {
10
- const movies = await getStarWarsMovies();
11
- return {
12
- pageContext: {
13
- pageProps: {
14
- // We remove data we don't need because we pass `pageContext.movies` to
15
- // the client; we want to minimize what is sent over the network.
16
- movies: filterMoviesData(movies),
17
- },
18
- // The page's <title>
19
- title: getTitle(movies),
20
- },
21
- };
22
- }
23
-
24
- async function getStarWarsMovies(): Promise<MovieDetails[]> {
25
- const response = await fetch("https://star-wars.brillout.com/api/films.json");
26
- let movies: MovieDetails[] = ((await response.json()) as any).results;
27
- movies = movies.map((movie: MovieDetails, i: number) => ({
28
- ...movie,
29
- id: String(i + 1),
30
- }));
31
- return movies;
32
- }
33
-
34
- function filterMoviesData(movies: MovieDetails[]): Movie[] {
35
- return movies.map((movie: MovieDetails) => {
36
- const { title, release_date, id } = movie;
37
- return { title, release_date, id };
38
- });
39
- }
40
-
41
- /*
42
- async function prerender() {
43
- const movies = await getStarWarsMovies()
44
- return [
45
- {
46
- url: '/star-wars',
47
- // We already provide `pageContext` here so that Vike
48
- // will *not* have to call the `onBeforeRender()` hook defined
49
- // above in this file.
50
- pageContext: {
51
- pageProps: {
52
- movies: filterMoviesData(movies)
53
- },
54
- documentProps: { title: getTitle(movies) }
55
- }
56
- },
57
- ...movies.map((movie) => {
58
- const url = `/star-wars/${movie.id}`
59
- return {
60
- url,
61
- // Note that we can also provide the `pageContext` of other pages.
62
- // This means that Vike will not call any
63
- // `onBeforeRender()` hook and the Star Wars API will be called
64
- // only once (in this `prerender()` hook).
65
- pageContext: {
66
- pageProps: {
67
- movie: filterMovieData(movie)
68
- },
69
- documentProps: { title: movie.title }
70
- }
71
- }
72
- })
73
- ]
74
- }
75
- */
76
-
77
- function getTitle(movies: Movie[] | MovieDetails[]): string {
78
- const title = `${movies.length} Star Wars Movies`;
79
- return title;
80
- }
1
+ export default onBeforeRender;
2
+
3
+ import fetch from "cross-fetch";
4
+ //import { filterMovieData } from '../filterMovieData'
5
+ import type { Movie, MovieDetails } from "../types";
6
+
7
+ // export { prerender }
8
+
9
+ async function onBeforeRender() {
10
+ const movies = await getStarWarsMovies();
11
+ return {
12
+ pageContext: {
13
+ pageProps: {
14
+ // We remove data we don't need because we pass `pageContext.movies` to
15
+ // the client; we want to minimize what is sent over the network.
16
+ movies: filterMoviesData(movies),
17
+ },
18
+ // The page's <title>
19
+ title: getTitle(movies),
20
+ },
21
+ };
22
+ }
23
+
24
+ async function getStarWarsMovies(): Promise<MovieDetails[]> {
25
+ const response = await fetch("https://star-wars.brillout.com/api/films.json");
26
+ let movies: MovieDetails[] = ((await response.json()) as any).results;
27
+ movies = movies.map((movie: MovieDetails, i: number) => ({
28
+ ...movie,
29
+ id: String(i + 1),
30
+ }));
31
+ return movies;
32
+ }
33
+
34
+ function filterMoviesData(movies: MovieDetails[]): Movie[] {
35
+ return movies.map((movie: MovieDetails) => {
36
+ const { title, release_date, id } = movie;
37
+ return { title, release_date, id };
38
+ });
39
+ }
40
+
41
+ /*
42
+ async function prerender() {
43
+ const movies = await getStarWarsMovies()
44
+ return [
45
+ {
46
+ url: '/star-wars',
47
+ // We already provide `pageContext` here so that Vike
48
+ // will *not* have to call the `onBeforeRender()` hook defined
49
+ // above in this file.
50
+ pageContext: {
51
+ pageProps: {
52
+ movies: filterMoviesData(movies)
53
+ },
54
+ documentProps: { title: getTitle(movies) }
55
+ }
56
+ },
57
+ ...movies.map((movie) => {
58
+ const url = `/star-wars/${movie.id}`
59
+ return {
60
+ url,
61
+ // Note that we can also provide the `pageContext` of other pages.
62
+ // This means that Vike will not call any
63
+ // `onBeforeRender()` hook and the Star Wars API will be called
64
+ // only once (in this `prerender()` hook).
65
+ pageContext: {
66
+ pageProps: {
67
+ movie: filterMovieData(movie)
68
+ },
69
+ documentProps: { title: movie.title }
70
+ }
71
+ }
72
+ })
73
+ ]
74
+ }
75
+ */
76
+
77
+ function getTitle(movies: Movie[] | MovieDetails[]): string {
78
+ const title = `${movies.length} Star Wars Movies`;
79
+ return title;
80
+ }
@@ -1,13 +1,13 @@
1
- export type Movie = {
2
- id: string;
3
- title: string;
4
- release_date: string;
5
- };
6
-
7
- export type MovieDetails = {
8
- id: string;
9
- title: string;
10
- release_date: string;
11
- director: string;
12
- producer: string;
13
- };
1
+ export type Movie = {
2
+ id: string;
3
+ title: string;
4
+ release_date: string;
5
+ };
6
+
7
+ export type MovieDetails = {
8
+ id: string;
9
+ title: string;
10
+ release_date: string;
11
+ director: string;
12
+ producer: string;
13
+ };
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/solid";
3
3
  var private2 = true;
4
- var version = "0.0.25";
4
+ var version = "0.0.27";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -21,7 +21,7 @@ var devDependencies = {
21
21
  "vike-solid": "^0.0.7",
22
22
  vite: "^4.3.9",
23
23
  "vite-plugin-solid": "^2.7.0",
24
- "vite-plugin-ssr": "^0.4.131"
24
+ "vite-plugin-ssr": "^0.4.132"
25
25
  };
26
26
  var dependencies = {
27
27
  "@batijs/core": "workspace:*"
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent, meta) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-7CSFX2AA.js"), {
5
+ return addDependency(packageJson, await import("../package-42PZAQG7.js"), {
6
6
  devDependencies: ["tailwindcss", "postcss", "autoprefixer"]
7
7
  });
8
8
  }
@@ -1,3 +1,3 @@
1
- @tailwind base;
2
- @tailwind components;
1
+ @tailwind base;
2
+ @tailwind components;
3
3
  @tailwind utilities;
@@ -1,6 +1,6 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- }
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
@@ -1,8 +1,8 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ["./{pages,layouts,components,src}/**/*.{html,js,jsx,ts,tsx}"],
4
- theme: {
5
- extend: {},
6
- },
7
- plugins: [],
8
- };
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ content: ["./{pages,layouts,components,src}/**/*.{html,js,jsx,ts,tsx}"],
4
+ theme: {
5
+ extend: {},
6
+ },
7
+ plugins: [],
8
+ };
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/tailwindcss";
3
3
  var private2 = true;
4
- var version = "0.0.25";
4
+ var version = "0.0.27";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -18,7 +18,7 @@ var devDependencies = {
18
18
  tailwindcss: "^3.3.2",
19
19
  tsup: "^6.7.0",
20
20
  vite: "^4.3.9",
21
- "vite-plugin-ssr": "^0.4.131"
21
+ "vite-plugin-ssr": "^0.4.132"
22
22
  };
23
23
  var dependencies = {
24
24
  "@batijs/core": "workspace:*"
@@ -2,7 +2,7 @@
2
2
  import { addDependency, loadAsJson } from "@batijs/core";
3
3
  async function getPackageJson(currentContent) {
4
4
  const packageJson = await loadAsJson(currentContent);
5
- return addDependency(packageJson, await import("../package-42IE3DIX.js"), {
5
+ return addDependency(packageJson, await import("../package-CWDTGB4Z.js"), {
6
6
  dependencies: ["telefunc"]
7
7
  });
8
8
  }
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var name = "@batijs/telefunc";
3
3
  var private2 = true;
4
- var version = "0.0.25";
4
+ var version = "0.0.27";
5
5
  var description = "";
6
6
  var type = "module";
7
7
  var scripts = {
@@ -13,10 +13,10 @@ var license = "MIT";
13
13
  var devDependencies = {
14
14
  "@batijs/tsup": "workspace:*",
15
15
  "@types/node": "^16.18.36",
16
- telefunc: "^0.1.55",
16
+ telefunc: "^0.1.57",
17
17
  tsup: "^6.7.0",
18
18
  vite: "^4.3.9",
19
- "vite-plugin-ssr": "^0.4.131"
19
+ "vite-plugin-ssr": "^0.4.132"
20
20
  };
21
21
  var dependencies = {
22
22
  "@batijs/core": "workspace:*"
@@ -69,6 +69,18 @@
69
69
  "hooks"
70
70
  ]
71
71
  },
72
+ {
73
+ "config": {
74
+ "flag": "react",
75
+ "name": "ReactJS",
76
+ "homepage": "https://react.dev"
77
+ },
78
+ "folder": "@batijs/react",
79
+ "description": "",
80
+ "subfolders": [
81
+ "files"
82
+ ]
83
+ },
72
84
  {
73
85
  "config": {},
74
86
  "folder": "@batijs/shared",
package/dist/index.js CHANGED
@@ -653,13 +653,13 @@ Please report this issue to https://github.com/magne4000/bati`
653
653
  // package.json
654
654
  var package_default = {
655
655
  name: "@batijs/cli",
656
- version: "0.0.25",
656
+ version: "0.0.27",
657
657
  description: "Scaffold typescript projects with ease and modularity",
658
658
  type: "module",
659
659
  scripts: {
660
660
  prerelease: "rimraf ./dist",
661
661
  prepublishOnly: "pnpm run build",
662
- test: "pnpm run build && vitest run --test-timeout=50000",
662
+ test: "pnpm run build && vitest run",
663
663
  build: "rimraf ./dist && tsup"
664
664
  },
665
665
  keywords: [],
@@ -671,7 +671,7 @@ var package_default = {
671
671
  "@types/node": "^16.18.36",
672
672
  citty: "^0.1.1",
673
673
  colorette: "^2.0.20",
674
- esbuild: "^0.18.2",
674
+ esbuild: "^0.18.7",
675
675
  espree: "^9.5.2",
676
676
  execa: "^7.1.1",
677
677
  "get-port": "^7.0.0",
@@ -681,7 +681,7 @@ var package_default = {
681
681
  tsup: "^6.7.0",
682
682
  typescript: "^5.1.3",
683
683
  vite: "^4.3.9",
684
- vitest: "^0.32.0"
684
+ vitest: "^0.32.2"
685
685
  },
686
686
  dependencies: {
687
687
  "@batijs/core": "workspace:*"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "Scaffold typescript projects with ease and modularity",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -10,7 +10,7 @@
10
10
  "@types/node": "^16.18.36",
11
11
  "citty": "^0.1.1",
12
12
  "colorette": "^2.0.20",
13
- "esbuild": "^0.18.2",
13
+ "esbuild": "^0.18.7",
14
14
  "espree": "^9.5.2",
15
15
  "execa": "^7.1.1",
16
16
  "get-port": "^7.0.0",
@@ -20,12 +20,12 @@
20
20
  "tsup": "^6.7.0",
21
21
  "typescript": "^5.1.3",
22
22
  "vite": "^4.3.9",
23
- "vitest": "^0.32.0",
24
- "@batijs/build": "0.0.25",
25
- "@batijs/tsup": "0.0.25"
23
+ "vitest": "^0.32.2",
24
+ "@batijs/tsup": "0.0.27",
25
+ "@batijs/build": "0.0.27"
26
26
  },
27
27
  "dependencies": {
28
- "@batijs/core": "0.0.25"
28
+ "@batijs/core": "0.0.27"
29
29
  },
30
30
  "bin": "./dist/index.js",
31
31
  "exports": {
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "scripts": {
45
45
  "prerelease": "rimraf ./dist",
46
- "test": "pnpm run build && vitest run --test-timeout=50000",
46
+ "test": "pnpm run build && vitest run",
47
47
  "build": "rimraf ./dist && tsup"
48
48
  }
49
49
  }