Skip to content

Commit 7bb111b

Browse files
committed
Imports
1 parent 4805575 commit 7bb111b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+193
-215
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-tinybase",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"author": "jamesgpearce",
55
"repository": {
66
"type": "git",
@@ -34,7 +34,7 @@
3434
"prePublishPackage": "npm run ts && npm run prettier && npm run lint && npm run test && npm run test:e2e"
3535
},
3636
"dependencies": {
37-
"tinycreate": "^1.0.2"
37+
"tinycreate": "^1.0.3"
3838
},
3939
"engines": {
4040
"node": ">=18.0.0"

screenshots/chat.png

-198 Bytes
Loading

screenshots/drawing.png

-1 Bytes
Loading

src/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const config = {
201201

202202
installCommand: '{pm} install',
203203
devCommand: '{pm} run dev',
204+
workingDirectory: 'client',
204205

205206
onSuccess: (projectName: string, context: Record<string, unknown>) => {
206207
const server = context.server as boolean;

templates/README.md.hbs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
# {{projectName}}
77

8-
A TinyBase app built with {{#if typescript}}TypeScript{{else}}JavaScript{{/if}}
9-
and {{#if react}}React{{else}}Vanilla JS{{/if}}.
8+
A TinyBase app built with {{#if typescript}}TypeScript{{else}}JavaScript{{/if}} and {{#if react}}React{{else}}Vanilla JS{{/if}}.
109

1110
## Getting Started
1211

@@ -24,16 +23,18 @@ npm run dev
2423
PNPM, Yarn, and Bun should also work. Your app will be available at
2524
`http://localhost:5173`, or whichever port Vite specifies in the console.
2625

27-
If you included server code, start the server in a separate terminal, ideally
28-
before starting the client:
26+
{{#if server}}
27+
If you included server code, start the server in a separate terminal, ideally
28+
before starting the client:
2929

30-
```bash
31-
# In a separate terminal
32-
cd server
33-
npm install
34-
npm run dev
35-
```
30+
```bash
31+
# In a separate terminal
32+
cd server
33+
npm install
34+
npm run dev
35+
```
3636

37+
{{/if}}
3738
After that, start hacking!
3839

3940
## Learn More

templates/client/src/chat/App.tsx.hbs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
import {StrictMode} from 'react';
1+
{{addImport "import {StrictMode} from 'react';"}}
22

33
{{#if schemas}}
44
import {Provider} from 'tinybase/ui-react/with-schemas';
55
{{else}}
66
import {Provider} from 'tinybase/ui-react';
77
{{/if}}
8-
import {Inspector} from 'tinybase/ui-react-inspector';
8+
{{addImport "import {Inspector} from 'tinybase/ui-react-inspector';"}}
99

1010
{{includeFile template="client/src/chat/SettingsStore.tsx.hbs" output="client/src/SettingsStore.{{ext}}"}}
11-
import {SettingsStore} from './SettingsStore';
11+
{{addImport "import {SettingsStore} from './SettingsStore';"}}
1212

1313
{{includeFile template="client/src/chat/ChatStore.tsx.hbs" output="client/src/ChatStore.{{ext}}"}}
14-
import {ChatStore} from './ChatStore';
14+
{{addImport "import {ChatStore} from './ChatStore';"}}
1515

1616
{{includeFile template="client/src/chat/UsernameInput.tsx.hbs" output="client/src/UsernameInput.{{ext}}"}}
17-
import {UsernameInput} from './UsernameInput';
17+
{{addImport "import {UsernameInput} from './UsernameInput';"}}
1818

1919
{{includeFile template="client/src/chat/Messages.tsx.hbs" output="client/src/Messages.{{ext}}"}}
20-
import {Messages} from './Messages';
20+
{{addImport "import {Messages} from './Messages';"}}
2121

2222
{{includeFile template="client/src/chat/MessageInput.tsx.hbs" output="client/src/MessageInput.{{ext}}"}}
23-
import {MessageInput} from './MessageInput';
23+
{{addImport "import {MessageInput} from './MessageInput';"}}
2424

2525
const App = () => {
2626
return (

templates/client/src/chat/Message.tsx.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {useRow, STORE_ID} from './ChatStore';
1+
{{addImport "import {useRow, STORE_ID} from './ChatStore';"}}
22

33
{{includeFile template="client/src/chat/message.css.hbs" output="client/src/message.css"}}
4-
import './message.css';
4+
{{addImport "import './message.css';"}}
55

66
interface MessageProps {
77
rowId: string;

templates/client/src/chat/MessageInput.tsx.hbs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{{includeFile template="client/src/chat/messageInput.css.hbs" output="client/src/messageInput.css"}}
2-
import {useState} from 'react';
3-
import {useAddRowCallback, STORE_ID as CHAT_STORE_ID} from './ChatStore';
4-
import {useValue, STORE_ID as SETTINGS_STORE_ID} from './SettingsStore';
5-
import './messageInput.css';
2+
{{addImport "import {useState} from 'react';"}}
3+
{{addImport "import {useAddRowCallback, STORE_ID as CHAT_STORE_ID} from './ChatStore';"}}
4+
{{addImport "import {useValue, STORE_ID as SETTINGS_STORE_ID} from './SettingsStore';"}}
5+
{{addImport "import './messageInput.css';"}}
66

77
{{includeFile template="client/src/shared/Button.tsx.hbs" output="client/src/Button.{{ext}}"}}
8-
import {Button} from './Button';
8+
{{addImport "import {Button} from './Button';"}}
99

1010
{{includeFile template="client/src/shared/Input.tsx.hbs" output="client/src/Input.{{ext}}"}}
11-
import {Input} from './Input';
11+
{{addImport "import {Input} from './Input';"}}
1212

1313
export const MessageInput = () => {
1414
const [message, setMessage] = useState('');

templates/client/src/chat/Messages.tsx.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import {useMemo} from 'react';
2-
import {useRowIds, useStore, STORE_ID} from './ChatStore';
1+
{{addImport "import {useMemo} from 'react';"}}
2+
{{addImport "import {useRowIds, useStore, STORE_ID} from './ChatStore';"}}
33

44
{{includeFile template="client/src/chat/messages.css.hbs" output="client/src/messages.css"}}
5-
import './messages.css';
5+
{{addImport "import './messages.css';"}}
66

77
{{includeFile template="client/src/chat/Message.tsx.hbs" output="client/src/Message.{{ext}}"}}
8-
import {Message} from './Message';
8+
{{addImport "import {Message} from './Message';"}}
99

1010
export const Messages = () => {
1111
const store = useStore(STORE_ID);

0 commit comments

Comments
 (0)