create-wp-reactor 0.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.
Files changed (51) hide show
  1. package/bin/create-app.js +61 -0
  2. package/dist/index.d.ts +18 -0
  3. package/dist/index.js +62 -0
  4. package/dist/index.js.map +1 -0
  5. package/package.json +48 -0
  6. package/templates/client/.env.example +7 -0
  7. package/templates/client/.github/workflows/ci.yml +24 -0
  8. package/templates/client/.github/workflows/deploy.yml +43 -0
  9. package/templates/client/README.md +40 -0
  10. package/templates/client/apps/webapp/.env.example +10 -0
  11. package/templates/client/apps/webapp/README.md +14 -0
  12. package/templates/client/apps/webapp/blocks/cta-banner/block.json +39 -0
  13. package/templates/client/apps/webapp/blocks/cta-banner/edit.tsx +65 -0
  14. package/templates/client/apps/webapp/blocks/cta-banner/editor.scss +3 -0
  15. package/templates/client/apps/webapp/blocks/cta-banner/index.tsx +9 -0
  16. package/templates/client/apps/webapp/blocks/cta-banner/render.php +11 -0
  17. package/templates/client/apps/webapp/blocks/cta-banner/save.tsx +3 -0
  18. package/templates/client/apps/webapp/package.json +44 -0
  19. package/templates/client/apps/webapp/schemas/cta-banner.json +41 -0
  20. package/templates/client/apps/webapp/src/authOps.ts +17 -0
  21. package/templates/client/apps/webapp/src/blocks.tsx +29 -0
  22. package/templates/client/apps/webapp/src/cart.ts +28 -0
  23. package/templates/client/apps/webapp/src/env.ts +28 -0
  24. package/templates/client/apps/webapp/src/renderers/CtaBannerBlock.tsx +20 -0
  25. package/templates/client/apps/webapp/src/router.tsx +42 -0
  26. package/templates/client/apps/webapp/src/routes/__root.tsx +45 -0
  27. package/templates/client/apps/webapp/src/routes/index.tsx +51 -0
  28. package/templates/client/apps/webapp/src/routes/preview.tsx +32 -0
  29. package/templates/client/apps/webapp/src/server/auth.ts +66 -0
  30. package/templates/client/apps/webapp/src/server/authMiddleware.ts +79 -0
  31. package/templates/client/apps/webapp/src/server/cart.ts +68 -0
  32. package/templates/client/apps/webapp/src/server/cartMiddleware.ts +60 -0
  33. package/templates/client/apps/webapp/src/server/session.ts +34 -0
  34. package/templates/client/apps/webapp/src/start.ts +19 -0
  35. package/templates/client/apps/webapp/src/styles.css +1 -0
  36. package/templates/client/apps/webapp/tsconfig.json +12 -0
  37. package/templates/client/apps/webapp/vite.config.ts +49 -0
  38. package/templates/client/apps/webapp/wp-reactor.config.json +13 -0
  39. package/templates/client/apps/wordpress/Dockerfile +11 -0
  40. package/templates/client/apps/wordpress/docker/child-entrypoint.sh +13 -0
  41. package/templates/client/apps/wordpress/theme-__PROJECT_NAME__/functions.php +12 -0
  42. package/templates/client/apps/wordpress/theme-__PROJECT_NAME__/index.php +2 -0
  43. package/templates/client/apps/wordpress/theme-__PROJECT_NAME__/src/blocks/.gitkeep +0 -0
  44. package/templates/client/apps/wordpress/theme-__PROJECT_NAME__/style.css +8 -0
  45. package/templates/client/apps/wordpress/theme-__PROJECT_NAME__/theme.json +5 -0
  46. package/templates/client/gitignore +14 -0
  47. package/templates/client/npmrc +5 -0
  48. package/templates/client/package.json +20 -0
  49. package/templates/client/pnpm-workspace.yaml +3 -0
  50. package/templates/client/turbo.json +9 -0
  51. package/templates/client/wp-reactor.config.json +9 -0
@@ -0,0 +1,2 @@
1
+ <?php
2
+ // Headless : le rendu public est délégué à la webapp (plugin wp-reactor-headless).
@@ -0,0 +1,8 @@
1
+ /*
2
+ Theme Name: __PROJECT_TITLE__
3
+ Template: wp-reactor-base
4
+ Author: __PROJECT_TITLE__
5
+ Description: Thème enfant __PROJECT_TITLE__ du framework WP Reactor (branding + blocs propres).
6
+ Version: 0.1.0
7
+ Text Domain: __PROJECT_NAME__
8
+ */
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://schemas.wp.org/trunk/theme.json",
3
+ "version": 3,
4
+ "settings": { "appearanceTools": true }
5
+ }
@@ -0,0 +1,14 @@
1
+ node_modules/
2
+ .pnpm-store/
3
+ dist/
4
+ build/
5
+ .output/
6
+ .nitro/
7
+ .turbo/
8
+ .vite/
9
+ **/routeTree.gen.ts
10
+ .env
11
+ .env.*
12
+ !.env.example
13
+ .DS_Store
14
+ *.log
@@ -0,0 +1,5 @@
1
+ # Packages @wp-reactor/* publiés sur GitHub Packages (org wp-reactor).
2
+ # Auth locale requise : ajouter une ligne
3
+ # //npm.pkg.github.com/:_authToken=<PAT read:packages>
4
+ # (ou via ~/.npmrc). En CI, actions/setup-node l'injecte.
5
+ @wp-reactor:registry=https://npm.pkg.github.com
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@__PROJECT_NAME__/source",
3
+ "private": true,
4
+ "type": "module",
5
+ "description": "Repo client WP Reactor — coque webapp + thème enfant.",
6
+ "scripts": {
7
+ "dev": "turbo run dev",
8
+ "build": "turbo run build",
9
+ "check-types": "turbo run check-types",
10
+ "lint": "turbo run lint",
11
+ "gen:block": "gen-block"
12
+ },
13
+ "devDependencies": {
14
+ "@wp-reactor/cli": "^0.1.0",
15
+ "turbo": "^2.9.6",
16
+ "typescript": "5.9.2"
17
+ },
18
+ "packageManager": "pnpm@11.3.0",
19
+ "engines": { "node": ">=20.19.0 || >=22.12.0" }
20
+ }
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - "apps/webapp"
3
+ - "apps/wordpress/theme-*"
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "tasks": {
4
+ "build": { "dependsOn": ["^build"], "outputs": ["dist/**", "build/**", ".output/**"] },
5
+ "check-types": {},
6
+ "lint": {},
7
+ "dev": { "cache": false, "persistent": true }
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "namespace": "__BLOCK_NAMESPACE__",
3
+ "schemasDir": "schemas",
4
+ "theme": { "blocksDir": "apps/wordpress/theme-__PROJECT_NAME__/src/blocks" },
5
+ "webapp": {
6
+ "renderersDir": "apps/webapp/src/renderers",
7
+ "registryFile": "apps/webapp/src/blocks.tsx"
8
+ }
9
+ }