Skip to content

Commit e7b1e8f

Browse files
CopilotArcadeMode
andauthored
Restructure sample: rename projects, flatten client dir, @typeshim→@client, merge people-ui into app (#94)
Cleans up the sample project layout — flatter structure, consistent naming, fewer npm packages. ## Changes - **Project renames** - `TypeShim.Sample` → `Client.Library` (dir, csproj, C# namespaces) - `TypeShim.Sample.Server` → `Server` (dir, csproj, C# namespaces) - `Sample.slnx` updated; `Server.csproj` project reference updated - **Flatten client directory** - `TypeShim.Sample.Client/` removed; contents (`package.json`, workspaces, `.gitignore`, etc.) lifted into `sample/` root - `.esproj` / `.esproj.user` deleted; removed from `Sample.slnx` - `Client.Library.csproj` `<OutputPath>` updated to new path - **`@typeshim` → `@client`** - Directory, all `package.json` names, TypeScript imports, string literals, `.gitignore` glob pattern - **Merge `@client/people-ui` into `@client/app`** - Components moved to `@client/app/src/people/` - `@client/app` no longer depends on `@client/people-ui` - `build:people` script removed; `package-lock.json` and root `tsconfig.json` references cleaned up - `@client/people-ui` package deleted <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/ArcadeMode/TypeShim/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
1 parent c488ef1 commit e7b1e8f

49 files changed

Lines changed: 51 additions & 149 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ temp/
9797
# Preserve root lock
9898
!package-lock.json
9999
# If individual workspace package-locks accidentally get created (npm -w install inside):
100-
@typeshim/*/package-lock.json
100+
@client/*/package-lock.json
101101

102102
# -----------------------------
103103
# Misc bundler artifacts

sample/TypeShim.Sample.Client/@typeshim/app/index.html renamed to sample/@client/app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>@typeshim/app Demo</title>
7+
<title>@client/app Demo</title>
88

99
<!-- enable when using WasmFingerprintAssets=true on the dotnet wasm project-->
1010
<!-- <script type="importmap"></script> -->

sample/TypeShim.Sample.Client/@typeshim/app/package.json renamed to sample/@client/app/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@typeshim/app",
2+
"name": "@client/app",
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
@@ -11,8 +11,5 @@
1111
},
1212
"keywords": [],
1313
"author": "",
14-
"license": "ISC",
15-
"dependencies": {
16-
"@typeshim/people-ui": "*"
17-
}
14+
"license": "ISC"
1815
}

sample/TypeShim.Sample.Client/@typeshim/app/src/App.tsx renamed to sample/@client/app/src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useState } from 'react';
22
import Home from './pages/Home';
33
import People from './pages/People';
4-
import { TypeShimProvider } from '@typeshim/wasm-exports';
5-
import { AppProvider } from '@typeshim/people-ui';
4+
import { TypeShimProvider } from '@client/wasm-exports';
5+
import { AppProvider } from './people/AppProvider';
66

77
type Page = 'home' | 'people';
88

@@ -28,7 +28,7 @@ function Content() {
2828
display: 'flex',
2929
gap: '1rem'
3030
}}>
31-
<strong style={{ marginRight: '1rem' }}>@typeshim/app</strong>
31+
<strong style={{ marginRight: '1rem' }}>@client/app</strong>
3232
<nav style={{ display: 'flex', gap: '1rem' }}>
3333
<a
3434
href="#"

sample/TypeShim.Sample.Client/@typeshim/app/src/index.css renamed to sample/@client/app/src/index.css

File renamed without changes.

sample/TypeShim.Sample.Client/@typeshim/app/src/main.tsx renamed to sample/@client/app/src/main.tsx

File renamed without changes.

sample/TypeShim.Sample.Client/@typeshim/app/src/pages/Home.tsx renamed to sample/@client/app/src/pages/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export default function Home() {
33
return (
44
<div>
5-
<h1>Welcome to @typeshim/app</h1>
5+
<h1>Welcome to @client/app</h1>
66
<p>This is a sample React app that demonstrates how TypeShim extends .NET &lt;&gt; Javascript interop with:</p>
77
<ul>
88
<li>Natural object semantics like:</li>

sample/TypeShim.Sample.Client/@typeshim/app/src/pages/People.tsx renamed to sample/@client/app/src/pages/People.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState } from 'react';
2-
import { PeopleList, PeopleGrid } from '@typeshim/people-ui';
2+
import { PeopleList, PeopleGrid } from '../people';
33

44
export default function People() {
55
const [view, setView] = useState<'list' | 'grid'>('list');

sample/TypeShim.Sample.Client/@typeshim/people-ui/src/AppProvider.tsx renamed to sample/@client/app/src/people/AppProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PeopleApp } from '@typeshim/wasm-exports';
1+
import { PeopleApp } from '@client/wasm-exports';
22
import { useMemo, ReactNode } from 'react';
33
import AppContext from './appContext';
44

sample/TypeShim.Sample.Client/@typeshim/people-ui/src/PeopleGrid.tsx renamed to sample/@client/app/src/people/PeopleGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import React, { useEffect, useState } from 'react';
44
import { PersonCard } from './PersonCard';
5-
import type { Person } from '@typeshim/wasm-exports';
5+
import type { Person } from '@client/wasm-exports';
66
import { PeopleRepository } from './PeopleRepository';
77
import AppContext from './appContext';
88

0 commit comments

Comments
 (0)