Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"!**/tsconfig.json",
"!**/tsconfig.*.json",
"!**/variant-schema.ts",
"!**/packages/create-hypergraph/template-*/**",
"!**/apps/template-*/**",
"!**/*.css",
"!**/packages/typesync-studio/src/generated/**/*.ts"
]
Expand Down
5 changes: 3 additions & 2 deletions packages/create-hypergraph/scripts/copy-template-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ class CopyTemplateDirService extends Effect.Service<CopyTemplateDirService>()(
const path = yield* Path.Path;

const cwd = process.cwd();
const appsDir = path.join(cwd, '..', '..', 'apps');

const getTemplateDirectories = () =>
Effect.gen(function* () {
return yield* Stream.fromIterable(readdirSync(cwd, { withFileTypes: true })).pipe(
return yield* Stream.fromIterable(readdirSync(appsDir, { withFileTypes: true })).pipe(
Stream.filter((entry) => entry.name.startsWith('template-') && entry.isDirectory()),
Stream.map((entry) => entry.name),
Stream.runCollect,
Expand Down Expand Up @@ -122,7 +123,7 @@ class CopyTemplateDirService extends Effect.Service<CopyTemplateDirService>()(
Effect.gen(function* () {
yield* Console.info('Copying template:', template, 'into dist');

const templateDir = path.resolve(process.cwd(), template);
const templateDir = path.resolve(appsDir, template);
const templateDirExists = yield* fs.exists(templateDir);
if (!templateDirExists) {
throw new TemplateDirDoesNotExistError({ template: templateDir });
Expand Down
2 changes: 1 addition & 1 deletion packages/create-hypergraph/src/Cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function scaffoldHypergraphApp(config: Readonly<ResolvedConfig>) {

const isDev = process.env.NODE_ENV === 'development' || __dirname.includes('/src/');
const templateDir = isDev
? path.resolve(__dirname, '..', framework.directory)
? path.resolve(__dirname, '..', '..', '..', 'apps', framework.directory)
: path.resolve(__dirname, framework.directory);
const templatDirExists = yield* fs.exists(templateDir);
if (!templatDirExists) {
Expand Down
2 changes: 0 additions & 2 deletions packages/create-hypergraph/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.scripts.json" },
// templates
{ "path": "./template-vite-react/tsconfig.json"}
]
}
511 changes: 77 additions & 434 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
packages:
- apps/*
- packages/*
- packages/*/*
- docs

onlyBuiltDependencies:
Expand Down
Loading