1
- <!-- <img|title here> -->
2
-
3
1
![ image] ( static/snap.png )
4
2
5
- <!-- shield.io, 'project built with' -->
3
+ ![ Static Badge] ( https://img.shields.io/badge/sveltekit-v2%2e0%2e0-f96743 ) ![ Static Badge] ( https://img.shields.io/badge/tailwindcss-v3%2e4%2e7-38bdf8 )
4
+ ![ image] ( static/snap.png )
6
5
7
6
![ Static Badge] ( https://img.shields.io/badge/sveltekit-v2%2e0%2e0-f96743 ) ![ Static Badge] ( https://img.shields.io/badge/tailwindcss-v3%2e4%2e7-38bdf8 )
8
7
@@ -22,10 +21,11 @@ This guide provides a first-hand experience on building a Svelte project using [
22
21
cd project_name
23
22
```
24
23
25
- ** 2. Install Tailwind CSS.**
24
+ ** 2. Install Tailwind CSS and sveltekit static adapter .** < small > [ reference here ] ( https://kit.svelte.dev/docs/adapter-static ) </ small >
26
25
27
26
``` bash
28
27
# terminal
28
+ npm i -D @sveltejs/adapter-static
29
29
npm install -D tailwindcss postcss autoprefixer
30
30
npx tailwindcss init -p
31
31
```
@@ -34,15 +34,15 @@ This guide provides a first-hand experience on building a Svelte project using [
34
34
35
35
``` js
36
36
// svelte.config.js
37
- import adapter from ' @sveltejs/adapter-auto ' ;
37
+ import adapter from ' @sveltejs/adapter-static ' ;
38
38
import { vitePreprocess } from ' @sveltejs/vite-plugin-svelte' ;
39
39
40
40
/** @type {import('@sveltejs/kit').Config} */
41
41
const config = {
42
- kit: {
43
- adapter: adapter ()
44
- },
45
- preprocess: vitePreprocess ()
42
+ kit: {
43
+ adapter: adapter ()
44
+ },
45
+ preprocess: vitePreprocess ()
46
46
};
47
47
48
48
export default config ;
@@ -54,11 +54,11 @@ export default config;
54
54
// tailwind.config.js
55
55
/** @type {import('tailwindcss').Config} */
56
56
export default {
57
- content: [' ./src/**/*.{html,js,svelte,ts}' ],
58
- theme: {
59
- extend: {}
60
- },
61
- plugins: []
57
+ content: [' ./src/**/*.{html,js,svelte,ts}' ],
58
+ theme: {
59
+ extend: {}
60
+ },
61
+ plugins: []
62
62
};
63
63
```
64
64
@@ -76,7 +76,7 @@ export default {
76
76
``` html
77
77
<!-- +layout.svelte -->
78
78
<script >
79
- import ' ../app.css' ;
79
+ import ' ../app.css' ;
80
80
</script >
81
81
82
82
<slot />
@@ -85,6 +85,8 @@ export default {
85
85
** 7. Start your build process.**
86
86
87
87
``` bash
88
+ # terminal
89
+ # terminal
88
90
npm run dev
89
91
```
90
92
@@ -94,9 +96,9 @@ export default {
94
96
<h1 class =" text-3xl font-bold underline" >Hello world!</h1 >
95
97
96
98
<style lang =" postcss" >
97
- :global(html ) {
98
- background-color : theme(colors.gray .100 );
99
- }
99
+ :global(html ) {
100
+ background-color : theme(colors.gray .100 );
101
+ }
100
102
</style >
101
103
```
102
104
@@ -159,9 +161,9 @@ npm install gh-pages --save-dev
159
161
160
162
``` json
161
163
{
162
- "scripts" : {
163
- "deploy" : " npm run build && gh-pages -d build -t true "
164
- }
164
+ "scripts" : {
165
+ "deploy" : " npm run build && gh-pages -d build"
166
+ }
165
167
}
166
168
```
167
169
0 commit comments