fuma 2.0.31 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,56 +1,3 @@
1
1
  # fuma
2
2
 
3
3
  My fullstack material build with sveltekit, daisyui, zod and more ...
4
-
5
- ## Fast setup
6
-
7
- ```sh
8
- echo "Enter project's name : " && read project_name
9
- echo "Enter mysql username : " && read mysql_username
10
-
11
- pn create svelte@latest $project_name
12
- cd $project_name
13
- px svelte-add@latest tailwindcss --tailwindcss-daisyui --tailwindcss-typography
14
- pn install
15
- pn install fuma prisma lucia oslo @lucia-auth/adapter-prisma
16
- sed -i "s|\}'\],|\}', './node_modules/**/fuma/dist/**/*.svelte'\],|g" tailwind.config.cjs
17
- # TODO: tailwind.config {darkMode: 'class', }
18
-
19
-
20
- sed -i 's|"singleQuote": true,|"singleQuote": true,\n\t"semi": false,|g' .prettierrc
21
-
22
- # Prisma
23
- px prisma init --datasource-provider mysql
24
-
25
- mkdir -p ./src/lib/server
26
- source="https://raw.githubusercontent.com/peufo/fuma/main"
27
- curl "$source/prisma/schema.prisma" -o ./prisma/schema.prisma
28
- curl "$source/src/lib/private/prisma.ts" -o ./src/lib/server/prisma.ts
29
-
30
- echo "DATABASE_URL=\"mysql://$mysql_username@localhost:3306/$project_name\"" > .env
31
- cp .env .env.example
32
- px prisma migrate dev --name init
33
- node -e "\
34
- const pkg = require('./package.json'); \
35
- pkg.scripts.migrate = 'prisma migrate dev'; \
36
- pkg.scripts.generate = 'prisma generate'; \
37
- pkg.scripts.studio = 'prisma studio'; \
38
- pkg.scripts.postinstall = 'prisma migrate deploy && prisma generate'; \
39
- fs.writeFileSync('./package.json', JSON.stringify(pkg, null, ' ')); \
40
- "
41
-
42
- # Authentication
43
- auth="src/routes/auth"
44
- mkdir -p "./$auth"
45
- curl "$source/src/app.d.ts" -o ./src/app.d.ts
46
- curl "$source/src/hooks.server.ts" -o ./src/hooks.server.ts
47
- curl "$source/src/lib/server/auth.ts" -o ./src/lib/server/auth.ts
48
- curl "$source/$auth/+page.svelte" -o "./$auth/+page.svelte"
49
- curl "$source/$auth/+page.server.ts" -o "./$auth/+page.server.ts"
50
-
51
- sed -i 's|import Login .*|import { Login } from "fuma"|g' "./$auth/+page.svelte"
52
- sed -i 's|$lib/validation/zod.js|fuma|g' "./$auth/+page.server.ts"
53
- sed -i 's|$lib/server/index.js|fuma/server|g' "./$auth/+page.server.ts"
54
-
55
- git init && git add -A && git commit -m "Initial commit"
56
- ```
@@ -1,28 +1,13 @@
1
1
  <script lang="ts">
2
- import { browser } from '$app/environment'
3
2
  import { ModeWatcher, toggleMode, mode } from 'mode-watcher'
4
3
  import { mdiWeatherNight, mdiWhiteBalanceSunny } from '@mdi/js'
5
4
 
6
5
  import { Icon } from '../icon/index.js'
7
- import { onMount } from 'svelte'
8
6
 
9
7
  let klass = ''
10
8
  export { klass as class }
11
9
  export let defaultMode: 'dark' | 'light' | 'system' | undefined = undefined
12
10
 
13
- onMount(() => {
14
- const [html] = document.getElementsByTagName('html')
15
- if (!html || !$mode) return
16
- html.setAttribute('data-theme', $mode)
17
- })
18
-
19
- mode.subscribe((_mode) => {
20
- if (!browser) return
21
- const [html] = document.getElementsByTagName('html')
22
- if (!html || !_mode) return
23
- html.setAttribute('data-theme', _mode)
24
- })
25
-
26
11
  $: path = $mode === 'light' ? mdiWhiteBalanceSunny : mdiWeatherNight
27
12
  </script>
28
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",