Skip to content

Commit 22116e9

Browse files
committed
updated readme
1 parent 51415d4 commit 22116e9

File tree

4 files changed

+14
-30
lines changed

4 files changed

+14
-30
lines changed

README.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# svelte-starter-postcss
22

3-
A starter for building Svelte web apps, with PostCSS supported.
3+
A starter for building Svelte web apps with tailwindcss.
44

55
## Getting Started
66

7-
Install using [degit](https://github.com/Rich-Harris/degit):
87

98
```bash
10-
npx degit github:noprodev/svelte-starter-postcss your-project-folder
11-
cd your-project-folder
9+
git clone marcograhl/tailwindcss-svelte-starter
1210
```
1311

1412
Then, install the dependencies:
@@ -17,30 +15,7 @@ Then, install the dependencies:
1715
npm install
1816
```
1917

20-
## Use PostCSS in Your Svelte Project
21-
22-
- [postcss-preset-env](https://preset-env.cssdb.org/), [PostCSS color-mod() Function](https://github.com/jonathantneal/postcss-color-mod-function) and [cssnano](https://cssnano.co/) are enabled already.
23-
- Add plugins as required (use <code>postcss.config.js</code>).
24-
- You can use PostCSS in your static stylesheets AND Svelte components!
25-
26-
```HTML
27-
<!-- App.svelte -->
28-
<style>
29-
main {
30-
width: 35em;
31-
margin: 1.5em auto;
32-
/* Nesting */
33-
& > h1 {
34-
/* Color manipulation */
35-
color: color-mod(#0000ff shade(20%));
36-
}
37-
}
38-
</style>
39-
40-
<main>
41-
<h1>Hello World!</h1>
42-
</main>
43-
```
18+
Use Tailwindcss (https://tailwindcss.com/)
4419

4520
## Building and Developing
4621

dist/components.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
const file = "src/Button.svelte";
287287

288288
function create_fragment(ctx) {
289-
var button, t0, t1, t2, t3_value = ctx.clicks === 1 ? 'time' : 'times', t3, dispose;
289+
var button, t0, t1, t2, t3_value = ctx.clicks === 1 ? 'time' : 'times', t3, t4, p, dispose;
290290

291291
return {
292292
c: function create() {
@@ -295,8 +295,12 @@
295295
t1 = text(ctx.clicks);
296296
t2 = space();
297297
t3 = text(t3_value);
298+
t4 = space();
299+
p = element("p");
300+
p.textContent = "hi";
298301
button.className = "color space border-none bg-blue-700 hover:bg-blue-400 rounded svelte-folwfl";
299302
add_location(button, file, 6, 0, 140);
303+
add_location(p, file, 11, 0, 310);
300304
dispose = listen(button, "click", ctx.handleClick);
301305
},
302306

@@ -310,6 +314,8 @@
310314
append(button, t1);
311315
append(button, t2);
312316
append(button, t3);
317+
insert(target, t4, anchor);
318+
insert(target, p, anchor);
313319
},
314320

315321
p: function update(changed, ctx) {
@@ -328,6 +334,8 @@
328334
d: function destroy(detaching) {
329335
if (detaching) {
330336
detach(button);
337+
detach(t4);
338+
detach(p);
331339
}
332340

333341
dispose();

src/Button.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
on:click={handleClick}>
1717
Clicked {clicks} {clicks === 1 ? 'time' : 'times'}
1818
</button>
19+
<p> hi</p>

0 commit comments

Comments
 (0)