Skip to content

Commit

Permalink
cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
raffazizzi committed Mar 7, 2023
1 parent 1abc443 commit e2a203e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 89 deletions.
21 changes: 0 additions & 21 deletions demo/.gitignore

This file was deleted.

50 changes: 1 addition & 49 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,4 @@
npm create astro@latest -- --template basics
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png)


## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :--------------------- | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
This is a demo / test for Astro TEI.
1 change: 1 addition & 0 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "astro-tei-demo",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/pb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface TEIProps {
availableRoutes?: string[]
}

export type PbBehavior = (props: TEIProps) => JSX.Element | null
export type PbBehavior = (props: TEIProps) => JSX.Element | null;

const Pb: PbBehavior = ({teiNode}: TEIProps) => {

Expand Down
12 changes: 9 additions & 3 deletions demo/src/components/tei.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import React from "react";
import BasicRouter from '@astro-tei/react';
import { DefaultBehaviors } from "@astro-tei/react";
import type { DefaultBehaviors } from "@astro-tei/react";
import type { IRoutes } from "@astro-tei/react";
import Pb from './pb';

export default function TEI({doc, data, elements}) {
interface Props {
doc: Document
data: string
elements: string[]
}

export default function TEI({doc, data, elements}: Props) {
const {
Tei,
Eg,
Expand All @@ -16,7 +22,7 @@ export default function TEI({doc, data, elements}) {
TeiHeader
} = DefaultBehaviors;

const routes: Routes = {
const routes: IRoutes = {
"tei-tei": Tei,
"teieg-egxml": Eg,
"tei-graphic": Graphic,
Expand Down
1 change: 0 additions & 1 deletion demo/src/env.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions demo/tsconfig.json

This file was deleted.

8 changes: 0 additions & 8 deletions src/index.ts

This file was deleted.

4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"module": "ESNext",
"moduleResolution": "nodenext",
"esModuleInterop": true,
"baseUrl": "src",
"lib": ["ES2021"],
"types": ["astro/client"]
},
"include": ["src/**/*", "packages/**/src/*"],
"exclude": ["src/__tests__/**/*", "dist", "src/components/**/*"],
"include": ["demo/src/*", "demo/src/**/*", "packages/**/src/*"]
}

0 comments on commit e2a203e

Please sign in to comment.