Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
16932bf
Initial Commit.
cpojer Apr 24, 2025
7ac5c69
Typo.
cpojer May 1, 2025
4662b45
Fail if patches fail to apply.
cpojer May 1, 2025
2a06721
Use `reactCanary`, remove React Native patches.
cpojer May 1, 2025
788de1e
Fix product names (#3)
karlhorky May 1, 2025
96e05ba
Update script for windows.
cpojer May 2, 2025
2831c50
Update deps.
cpojer May 2, 2025
08d5103
Update deps.
cpojer May 6, 2025
31424c9
Update deps.
cpojer May 9, 2025
21a8589
Update deps.
cpojer May 12, 2025
26607e0
Add `expo-build-disk-cache`.
cpojer May 12, 2025
134377d
unbreak vitest for react-native (#7)
subtleGradient May 12, 2025
d9c67fd
update expo-build-disk-cache config (#10)
WookieFPV May 15, 2025
6419c7d
Update name of `source_strings.json` to make things work with Crowdin…
cpojer May 19, 2025
12f8498
Update deps.
cpojer May 19, 2025
1e65a6f
Fix `pnpm dev:setup`.
cpojer May 22, 2025
c43774f
Update deps.
cpojer May 22, 2025
0360307
Update deps.
cpojer May 26, 2025
bd18512
Update deps.
cpojer Jun 3, 2025
1662033
Remove outdated `package.json` eslint config.
cpojer Jun 17, 2025
af7f86c
Add LICENSE.
cpojer Jun 17, 2025
ebcb675
Update deps.
cpojer Jun 18, 2025
dca2a5e
Update deps.
cpojer Jun 22, 2025
9d8550a
Use the new `LocaleContext` from **fbtee**.
cpojer Jun 22, 2025
d9c597d
README update.
cpojer Jun 22, 2025
c6a3d05
Mention `with-relay` branch.
cpojer Jun 23, 2025
d3fbd64
Update `pnpm` config.
cpojer Jun 24, 2025
0ac8b9d
Update deps.
cpojer Jun 24, 2025
9df497c
Use prettier 3.6.0.
cpojer Jun 24, 2025
3142a58
Remove `expo-linear-gradient` from the defaults.
cpojer Jun 25, 2025
505e1a1
Looks like pnpm's `nodeLinker` still needs to be `hoisted`.
cpojer Jun 25, 2025
75de2e4
Automatically wipe Metro's cache when dependencies change.
cpojer Jun 25, 2025
916a740
Update README.md.
cpojer Jun 25, 2025
37a6095
Update deps.
cpojer Jun 25, 2025
6bcb346
sync ghooks prettier args with pkg.json (#15)
oieduardorabelo Jun 29, 2025
3991421
Set the default `rem` value to `16px`.
cpojer Jun 30, 2025
68df3a2
Update deps.
cpojer Jun 30, 2025
48eaaa6
Add `@nkzw/stack`.
cpojer Jun 30, 2025
5c6dfdb
Update `@nkzw/stack`.
cpojer Jul 1, 2025
0674709
Switch to `react-native-mmkv`.
cpojer Jul 2, 2025
0b26a34
Update deps.
cpojer Jul 3, 2025
c607172
Update deps.
cpojer Jul 4, 2025
c741bd4
Use `startTransition`.
cpojer Jul 7, 2025
cf23b87
Update deps.
cpojer Jul 7, 2025
3e8def2
Update `setLocalSetting`.
cpojer Jul 14, 2025
e6bee35
Update deps.
cpojer Jul 14, 2025
455533c
chore: delete unused styled-component recommendation (#17)
GalindoSVQ Aug 25, 2025
325a401
Update deps.
cpojer Aug 27, 2025
28b751b
Update deps.
cpojer Sep 1, 2025
f4f099c
Update deps.
cpojer Sep 3, 2025
1d93802
Wait, it's finally "Nativewind" now, not NativeWind? Phew.
cpojer Sep 4, 2025
090488e
Update deps.
cpojer Sep 4, 2025
d2d6912
Update README with quick start and fork info
subtleGradient Sep 10, 2025
ba4eeb4
AGENTS.md
subtleGradient Sep 10, 2025
e0765be
Update build and test instructions in AGENTS.md
subtleGradient Sep 10, 2025
a10b529
pnpx create-expo-app@latest
subtleGradient Sep 10, 2025
c9bffc1
Set nodeLinker to isolated in pnpm-workspace.yaml
subtleGradient Sep 10, 2025
4316693
++lock
subtleGradient Sep 10, 2025
888e254
feat(create-effect-app): run optional post-create script and add basi…
subtleGradient Sep 10, 2025
c30bbc2
chore(templates): import expo-app-template (history preserved, intern…
subtleGradient Sep 10, 2025
80a0ae7
Add script to update expo-app-template via git subtree
subtleGradient Sep 10, 2025
55c901c
Update to Expo 54 and React Native 0.81, fixes #21.
cpojer Sep 10, 2025
10baeee
Oh, we don't need to hoist anymore!
cpojer Sep 11, 2025
42ee507
Update nixpkgs and switch devShell to mkShellNoCC with pnpm
subtleGradient Sep 11, 2025
ecc4b50
chore(templates): update expo-app-template to latest (history preserv…
subtleGradient Sep 11, 2025
9dc3761
+flake
subtleGradient Sep 11, 2025
207dba5
Add agent guidelines and symlinks for Claude and Gemini
subtleGradient Sep 11, 2025
383a074
Add did-create-effect-app script for Expo app setup
subtleGradient Sep 11, 2025
b2622dc
Update create-effect-app.mjs
subtleGradient Sep 11, 2025
166feed
Improve CLI shim to try bun, tsx, pnpm dlx, then npx
subtleGradient Sep 11, 2025
9aaa678
Discover templates dynamically and improve prompt choices
subtleGradient Sep 11, 2025
02090db
Inline template configuration and local copy support for
subtleGradient Sep 11, 2025
367ee24
Update create-effect-app.mjs
subtleGradient Sep 11, 2025
5d59710
Update GitHub.ts
subtleGradient Sep 11, 2025
73791b5
Add .npmignore to include .gitignore in package
subtleGradient Sep 11, 2025
76f715a
-templates/react-native-expo
subtleGradient Sep 11, 2025
570761a
Move .npmignore from templates to project root
subtleGradient Sep 11, 2025
cf290c0
Update .npmignore
subtleGradient Sep 11, 2025
b8101a7
Remove .npmignore and add files field to package.json
subtleGradient Sep 11, 2025
2a8058f
Include template .gitignore files in npm package
subtleGradient Sep 11, 2025
203f7ac
Update package.json
subtleGradient Sep 11, 2025
d5a0120
Normalize gitignore filenames after example/template download
subtleGradient Sep 11, 2025
67da3dd
Add .gitignore files to example and template folders
subtleGradient Sep 11, 2025
bcd683f
Rename gitignore files to .gitignore after project setup
subtleGradient Sep 11, 2025
c56b13d
Refactor gitignore normalization logic for templates and examples
subtleGradient Sep 11, 2025
9c88476
Update Effect dependencies and improve CLI handling
subtleGradient Sep 11, 2025
3d9ffd7
Update did-create-effect-app.mjs
subtleGradient Sep 11, 2025
7156a92
Update did-create-effect-app.mjs
subtleGradient Sep 11, 2025
2e464ec
Add expo-build-properties to Expo app template
subtleGradient Sep 11, 2025
c2fdd3e
Add react-native-css-interop to expo-app template dependencies
subtleGradient Sep 11, 2025
8c8a76f
Add JDK 17 and set JAVA_HOME for Android/Gradle
subtleGradient Sep 11, 2025
e520305
Add android:doctor script and preflight check for Expo apps
subtleGradient Sep 11, 2025
2e24c0c
Fix JAVA_HOME to use Nix JDK root in shellHook
subtleGradient Sep 11, 2025
97630a5
Set PREFAB_NO_ARGFILE=1 for android script in package.json
subtleGradient Sep 11, 2025
c0c8d9e
Add .npmrc with hoisted node linker settings
subtleGradient Sep 11, 2025
8a98f5d
Support local folder and GitHub repo as template sources
subtleGradient Sep 11, 2025
3163487
lint--
subtleGradient Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Repository Guidelines

## Project Structure & Module Organization
- Root: PNPM workspace (`pnpm-workspace.yaml`), TypeScript + Vitest.
- Packages: `packages/*` (e.g., `packages/create-effect-app`). Source in `src/`, build to `dist/`.
- Examples: `examples/*` (e.g., `examples/http-server`). Not part of the workspace; manage deps per example.
- Templates & Scripts: `templates/*`, `scripts/*`; CLI shim in `bin/`.

## Build, Test, and Development Commands
- Env: Node >=18 (CI uses 24.5.0), PNPM 10.x. Optional: `nix develop` for a reproducible shell.
- Install: `pnpm install` (root workspace only).
- Type check: `pnpm check` (runs TS project references across packages).
- Lint: `pnpm lint` (ESLint + dprint rules). Fix: `pnpm lint-fix`.
- Build: `pnpm build` (builds all workspace packages in parallel).
- Test (workspace): `pnpm vitest`.
- Test one package: `pnpm vitest packages/create-effect-app` (workspace filter by path).
- Run an example: `cd examples/http-server && pnpm install && pnpm dev` (or `pnpm test`).

## Coding Style & Naming Conventions
- Language: TypeScript (ESM). Indent 2 spaces; max line 120.
- Quotes: double; semicolons: ASI; trailing commas: never.
- Imports: prefer explicit type imports; avoid unused vars (prefix `_` if intentional).
- Lint/format is enforced via ESLint (`eslint.config.mjs`) with `@effect/dprint`.

## Testing Guidelines
- Framework: Vitest. Unit tests live under `test/**/*.test.ts`.
- Workspace config: `vitest.workspace.ts`; shared defaults in `vitest.shared.ts`.
- Keep tests fast/deterministic; mock external IO. Aim for green in <10 minutes CI.

## Commit & Pull Request Guidelines
- Small, focused PRs. Describe the change, rationale, and acceptance examples.
- Link related issues. Include screenshots/CLI output when relevant.
- For package changes, add a changeset: `pnpm changeset` (CI handles versioning/publish).
- Pre-push: `pnpm lint && pnpm check && pnpm vitest`.

## Agent Workflow (XP)
- Work in thin slices: pair → TDD (red→green→refactor) → integrate.
- After each change: ensure tests pass, clarify code, remove duplication, and simplify.
1 change: 1 addition & 0 deletions CLAUDE.md
1 change: 1 addition & 0 deletions GEMINI.md
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[![Nightly Build](https://github.com/Effect-TS/examples/workflows/Nightly%20Checks/badge.svg)](https://github.com/Effect-TS/examples/actions)
## Quick Start

```sh
pnpm dlx create-effect-app@github:effect-native/examples
```

This is a fork of the https://github.com/Effect-TS/examples repo with extra examples for Effect Native.

---

# Effect Examples

Expand Down
59 changes: 55 additions & 4 deletions bin/create-effect-app.mjs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
#!/usr/bin/env -S node --enable-source-maps --import=tsx
// Tiny shim to run the TypeScript CLI without building
// Delegates to the workspace package's TS entrypoint
#!/usr/bin/env node
// Tiny shim to run the TypeScript CLI without building.
// Order: bun → tsx → pnpm dlx bun → npx bun

await import(new URL("../packages/create-effect-app/src/bin.ts", import.meta.url).href)
import { spawnSync } from "node:child_process"
import { fileURLToPath } from "node:url"
import path from "node:path"

const args = process.argv.slice(2)
const here = path.dirname(fileURLToPath(import.meta.url))
const tsEntry = path.resolve(here, "../packages/create-effect-app/src/bin.ts")

function tryRun(cmd, cmdArgs, stdio = "inherit") {
try {
const result = spawnSync(cmd, cmdArgs, { stdio })
if (typeof result.status === "number") return result.status
return 1
} catch (err) {
if (err && err.code === "ENOENT") return 127
throw err
}
}

function has(cmd) {
return tryRun(cmd, ["--version"], "ignore") === 0
}

// 1) If bun is available locally, use it to run TS directly
if (has("bun")) {
const code = tryRun("bun", [tsEntry, ...args])
process.exit(code)
}

// 2) If tsx is available, use it under Node
if (has("tsx")) {
const code = tryRun("tsx", [tsEntry, ...args])
process.exit(code)
}

// 3) Try fetching Bun via pnpm dlx
let code = tryRun("pnpm", ["dlx", "bun", tsEntry, ...args])

if (code === 127 || code === 1) {
// 4) Try fetching Bun via npx
code = tryRun("npx", ["bun", tsEntry, ...args])
}

if (code !== 0) {
console.error(
"\ncreate-effect-app: could not execute with bun or tsx.\n" +
"Tried local bun, local tsx, pnpm dlx bun, then npx bun.\n" +
"Install Bun (recommended) or tsx, or ensure pnpm/npm can fetch bun.\n"
)
}

process.exit(code)
8 changes: 8 additions & 0 deletions examples/http-server/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.direnv/
node_modules/
dist/
/data/*
!.gitkeep
.env
*.tsbuildinfo
.DS_Store
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
{
formatter = forAllSystems (pkgs: pkgs.alejandra);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
default = pkgs.mkShellNoCC {
packages = with pkgs; [
corepack
findutils
jq
nodejs
pnpm
];
};
});
Expand Down
21 changes: 15 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@
"changeset-version": "changeset version && node ./scripts/version.mjs && node ./scripts/examples.mjs && node ./scripts/templates.mjs",
"changeset-publish": "pnpm build && TEST_DIST= pnpm vitest && changeset publish"
},
"files": [
"bin/",
"packages/create-effect-app/src/",
"examples/",
"templates/",
"README.md",
".gitignore"
],
"bin": {
"create-effect-app": "bin/create-effect-app.mjs"
},
"dependencies": {
"@effect/cli": "^0.48.21",
"@effect/platform": "^0.69.21",
"@effect/platform-node": "^0.64.23",
"@effect/printer-ansi": "^0.38.14",
"effect": "^3.10.14",
"@effect/cli": "^0.48.31",
"@effect/platform": "^0.69.31",
"@effect/platform-node": "^0.64.33",
"@effect/printer-ansi": "^0.38.19",
"effect": "^3.17.13",
"tar": "^7.4.3",
"tsx": "^4.19.2",
"yaml": "^2.6.0"
Expand All @@ -33,7 +41,8 @@
"@dprint/formatter": "^0.4.1",
"@effect/eslint-plugin": "^0.3.2",
"@effect/language-service": "latest",
"@effect/vitest": "^0.13.14",
"@effect/typeclass": "^0.29.19",
"@effect/vitest": "^0.13.19",
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/create-effect-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"check": "tsc -b tsconfig.json"
},
"devDependencies": {
"@effect/cli": "^0.48.21",
"@effect/platform": "^0.69.21",
"@effect/platform-node": "^0.64.23",
"@effect/printer": "^0.38.14",
"@effect/printer-ansi": "^0.38.14",
"effect": "^3.10.14",
"@effect/cli": "^0.48.31",
"@effect/platform": "^0.69.31",
"@effect/platform-node": "^0.64.33",
"@effect/printer": "^0.38.19",
"@effect/printer-ansi": "^0.38.19",
"effect": "^3.17.13",
"tar": "^7.4.3",
"tsup": "^8.3.5",
"yaml": "^2.6.0"
Expand Down
Loading