Rename shared code references
This commit is contained in:
1 parent
df68167d04
commit
da1cdca3b2
5 files changed
+38
-45
No files matched your search
@@ -1,4 +1,4 @@
|
||||
# SharedCode packages
|
||||
# shared packages
|
||||
|
||||
This folder is the single source of truth for reusable web UI across the projects in this workspace.
|
||||
|
||||
@@ -33,30 +33,6 @@ go test ./...
|
||||
go vet ./...
|
||||
```
|
||||
|
||||
## Consume from the Gitea repository
|
||||
|
||||
The repository is the canonical source and is installable directly from Gitea. The root package
|
||||
builds the Svelte package during installation and exposes the runtime packages as subpaths:
|
||||
|
||||
```bash
|
||||
npm install --save-exact git+https://repos.gfranz.ch/Gabriel20xx/shared#<commit>
|
||||
```
|
||||
|
||||
Use the shared UI from the root package:
|
||||
|
||||
```ts
|
||||
import { AppShell, AuthPage, Header, SettingsDialog } from '@gabriel20xx/shared-code/web-ui';
|
||||
```
|
||||
|
||||
Import the shared stylesheet once from the application's global stylesheet:
|
||||
|
||||
```css
|
||||
@import '@gabriel20xx/shared-code/web-ui/styles.css';
|
||||
```
|
||||
|
||||
The dependency should be pinned to a commit in application lockfiles. Update it when a new
|
||||
SharedCode version has been validated.
|
||||
|
||||
## Publish the individual packages
|
||||
|
||||
The package names use the `@gabriel20xx` npm scope. The `publish-npm.yml` and
|
||||
|
||||
Reference in new issue
Block a user