Skip to content

Commit a55f2b1

Browse files
feat: use junobuild/core in all templates (#53)
1 parent dd20740 commit a55f2b1

File tree

22 files changed

+26
-26
lines changed

22 files changed

+26
-26
lines changed

templates/nextjs-example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"start": "next start",
99
"lint": "next lint",
1010
"format": "prettier --write .",
11-
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core-peer/dist/workers/', './public/workers', {recursive: true});\"",
11+
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core/dist/workers/', './public/workers', {recursive: true});\"",
1212
"postinstall": "npm run postinstall:copy-auth"
1313
},
1414
"dependencies": {
15-
"@junobuild/core-peer": "^0.0.29",
15+
"@junobuild/core": "^0.1.0",
1616
"nanoid": "^5.0.7",
1717
"next": "15.0.3",
1818
"react": "19.0.0-rc-66855b96-20241106",

templates/nextjs-example/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Background} from '@/components/background';
55
import {Footer} from '@/components/footer';
66
import {Modal} from '@/components/modal';
77
import {Table} from '@/components/table';
8-
import {initSatellite} from '@junobuild/core-peer';
8+
import {initSatellite} from '@junobuild/core';
99
import {useEffect} from 'react';
1010

1111
export default function Home() {

templates/nextjs-example/src/components/auth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Login} from '@/components/login';
22
import {Logout} from '@/components/logout';
3-
import {authSubscribe, type User} from '@junobuild/core-peer';
3+
import {authSubscribe, type User} from '@junobuild/core';
44
import {createContext, useEffect, useState, type ReactNode} from 'react';
55

66
export const AuthContext = createContext<{user: User | undefined | null}>({user: undefined});

templates/nextjs-example/src/components/delete.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Backdrop} from '@/components/backdrop';
22
import type {Note} from '@/types/note';
3-
import {deleteAsset, deleteDoc} from '@junobuild/core-peer';
3+
import {deleteAsset, deleteDoc} from '@junobuild/core';
44
import {useState} from 'react';
55

66
interface DeleteProps {

templates/nextjs-example/src/components/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Button} from '@/components/button';
2-
import {signIn} from '@junobuild/core-peer';
2+
import {signIn} from '@junobuild/core';
33

44
export const Login = () => {
55
return <Button onClick={signIn}>Sign in</Button>;

templates/nextjs-example/src/components/logout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {signOut} from '@junobuild/core-peer';
1+
import {signOut} from '@junobuild/core';
22

33
export const Logout = () => {
44
return (

templates/nextjs-example/src/components/modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {AuthContext} from '@/components/auth';
22
import {Backdrop} from '@/components/backdrop';
33
import {Button} from '@/components/button';
4-
import {setDoc, uploadFile} from '@junobuild/core-peer';
4+
import {setDoc, uploadFile} from '@junobuild/core';
55
import {nanoid} from 'nanoid';
66
import {useContext, useEffect, useRef, useState} from 'react';
77

templates/nextjs-example/src/components/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {AuthContext} from '@/components/auth';
22
import {Delete} from '@/components/delete';
33
import type {Note, NoteData} from '@/types/note';
4-
import {listDocs} from '@junobuild/core-peer';
4+
import {listDocs} from '@junobuild/core';
55
import {useContext, useEffect, useState} from 'react';
66

77
export const Table = () => {

templates/nextjs-example/src/types/note.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {Doc} from '@junobuild/core-peer';
1+
import type {Doc} from '@junobuild/core';
22

33
export interface NoteData {
44
text: string;

templates/nextjs-starter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"start": "next start",
99
"lint": "next lint",
1010
"format": "prettier --write .",
11-
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core-peer/dist/workers/', './public/workers', {recursive: true});\"",
11+
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core/dist/workers/', './public/workers', {recursive: true});\"",
1212
"postinstall": "npm run postinstall:copy-auth"
1313
},
1414
"dependencies": {
15-
"@junobuild/core-peer": "^0.0.29",
15+
"@junobuild/core": "^0.1.0",
1616
"next": "15.0.3",
1717
"react": "19.0.0-rc-66855b96-20241106",
1818
"react-dom": "19.0.0-rc-66855b96-20241106"

templates/nextjs-starter/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {Article} from '@/components/article';
44
import {Background} from '@/components/background';
55
import {Footer} from '@/components/footer';
66
import {Hero} from '@/components/hero';
7-
import {initSatellite} from '@junobuild/core-peer';
7+
import {initSatellite} from '@junobuild/core';
88
import {useEffect} from 'react';
99

1010
export default function Home() {

templates/sveltekit-example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1111
"lint": "prettier --check . && eslint .",
1212
"format": "prettier --write .",
13-
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core-peer/dist/workers/', './static/workers', {recursive: true});\"",
13+
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core/dist/workers/', './static/workers', {recursive: true});\"",
1414
"postinstall": "npm run postinstall:copy-auth"
1515
},
1616
"devDependencies": {
@@ -38,7 +38,7 @@
3838
},
3939
"type": "module",
4040
"dependencies": {
41-
"@junobuild/core-peer": "^0.0.29",
41+
"@junobuild/core": "^0.1.0",
4242
"nanoid": "^5.0.9"
4343
}
4444
}

templates/sveltekit-example/src/lib/components/Auth.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { onDestroy, onMount, type Snippet } from 'svelte';
3-
import { authSubscribe } from '@junobuild/core-peer';
3+
import { authSubscribe } from '@junobuild/core';
44
import { userStore } from '$lib/stores/user.store';
55
import { userSignedIn } from '$lib/derived/user.derived';
66
import Logout from '$lib/components/Logout.svelte';

templates/sveltekit-example/src/lib/components/Delete.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import type { Note } from '$lib/types/note';
3-
import { deleteAsset, deleteDoc, type Doc } from '@junobuild/core-peer';
3+
import { deleteAsset, deleteDoc, type Doc } from '@junobuild/core';
44
import Backdrop from '$lib/components/Backdrop.svelte';
55
66
interface Props {

templates/sveltekit-example/src/lib/components/Login.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import Button from '$lib/components/Button.svelte';
3-
import { signIn } from '@junobuild/core-peer';
3+
import { signIn } from '@junobuild/core';
44
55
const login = async () => {
66
await signIn();

templates/sveltekit-example/src/lib/components/Logout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { signOut } from '@junobuild/core-peer';
2+
import { signOut } from '@junobuild/core';
33
</script>
44

55
<button

templates/sveltekit-example/src/lib/components/Modal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Backdrop from '$lib/components/Backdrop.svelte';
33
import Button from '$lib/components/Button.svelte';
44
import { userSignedIn } from '$lib/derived/user.derived';
5-
import { setDoc, uploadFile } from '@junobuild/core-peer';
5+
import { setDoc, uploadFile } from '@junobuild/core';
66
import { nanoid } from 'nanoid';
77
import type { Note } from '$lib/types/note';
88
import { userStore } from '$lib/stores/user.store';

templates/sveltekit-example/src/lib/components/Table.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import type { Note } from '$lib/types/note';
3-
import { type Doc, listDocs } from '@junobuild/core-peer';
3+
import { type Doc, listDocs } from '@junobuild/core';
44
import Delete from '$lib/components/Delete.svelte';
55
import { userNotSignedIn } from '$lib/derived/user.derived';
66
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import type { User } from '@junobuild/core-peer';
1+
import type { User } from '@junobuild/core';
22

33
export type UserOption = User | undefined | null;

templates/sveltekit-example/src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import type { Snippet } from 'svelte';
3-
import { initSatellite } from '@junobuild/core-peer';
3+
import { initSatellite } from '@junobuild/core';
44
import Footer from '$lib/components/Footer.svelte';
55
import Background from '$lib/components/Background.svelte';
66
import '../app.css';

templates/sveltekit-starter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
1111
"lint": "prettier --check . && eslint .",
1212
"format": "prettier --write .",
13-
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core-peer/dist/workers/', './static/workers', {recursive: true});\"",
13+
"postinstall:copy-auth": "node -e \"require('fs').cpSync('node_modules/@junobuild/core/dist/workers/', './static/workers', {recursive: true});\"",
1414
"postinstall": "npm run postinstall:copy-auth"
1515
},
1616
"devDependencies": {
@@ -38,6 +38,6 @@
3838
},
3939
"type": "module",
4040
"dependencies": {
41-
"@junobuild/core-peer": "^0.0.29"
41+
"@junobuild/core": "^0.1.0"
4242
}
4343
}

templates/sveltekit-starter/src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { onMount, type Snippet } from 'svelte';
3-
import { initSatellite } from '@junobuild/core-peer';
3+
import { initSatellite } from '@junobuild/core';
44
import Footer from '$lib/components/Footer.svelte';
55
import Background from '$lib/components/Background.svelte';
66
import '../app.css';

0 commit comments

Comments
 (0)