Skip to content

Commit 75de3b3

Browse files
committed
Improve Getting Started docs
1 parent 69dd826 commit 75de3b3

1 file changed

Lines changed: 59 additions & 40 deletions

File tree

packages/layerchart/src/routes/getting-started/+page.svelte

Lines changed: 59 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,40 @@
2323
<div class="grid gap-3">
2424
{#if selectedTab === 'svelte-ux'}
2525
<div>
26-
Follow the <a href="https://svelte-ux.techniq.dev/">Svelte UX</a> instructions to create a new
27-
project
26+
<h2>Setup project</h2>
27+
<p>
28+
Follow the
29+
<a href="https://svelte-ux.techniq.dev/">Svelte UX</a> instructions to create a new project
30+
</p>
2831
</div>
29-
30-
<div>Install <code>layerchart</code> package</div>
31-
<Code source={`npm install layerchart`} language="sh" />
32-
33-
<div>Update LayerChart components to <code>tailwind.config.cjs</code> content</div>
34-
<Code
35-
source={`module.exports = {
36-
content: [
37-
'./src/**/*.{html,svelte}',
38-
'./node_modules/svelte-ux/**/*.{svelte,js}',
39-
'./node_modules/layerchart/**/*.{svelte,js}' // <--- Add this
40-
],
41-
};`}
42-
language="js"
43-
/>
4432
{:else if selectedTab === 'standalone'}
4533
<div>
46-
Follow the Tailwind <a href="https://tailwindcss.com/docs/guides/sveltekit" target="_blank">
47-
guide
48-
</a> to setup a new SvelteKit project with Tailwind.
49-
</div>
50-
51-
<div>OR</div>
52-
53-
<div>Start a new project SvelteKit project</div>
54-
<Code source={`npm create svelte@latest`} language="sh" />
55-
56-
<div>Install <code>layerchart</code> package</div>
57-
<Code source={`npm install layerchart`} language="sh" />
58-
59-
<div>
60-
Add and setup Tailwind using <a
61-
href="https://github.com/svelte-add/tailwindcss"
62-
target="_blank"
34+
<h2>Setup project</h2>
35+
Use can use LayerChart with your existing project, such as
36+
<a href="https://www.skeleton.dev/" target="_blank">Skeleton</a>,
37+
<a href="https://www.shadcn-svelte.com/" target="_blank">shadcn-svelte</a>, or
38+
<a href="https://daisyui.com/" target="_blank">Daisy UI</a>, although we are still
39+
evaluating the best integration approach and would love your feedback (<a
40+
href="https://discord.gg/697JhMPD3t"
41+
target="_blank">Discord</a
6342
>
64-
svelte-add
65-
</a>
43+
or <a href="https://github.com/techniq/layerchart/pulls" target="_blank">pull requests</a>).
44+
45+
<p>
46+
You can also create a new Tailwind project following their
47+
<a href="https://tailwindcss.com/docs/guides/sveltekit" target="_blank">guide</a>
48+
or use
49+
<a href="https://github.com/svelte-add/tailwindcss" target="_blank">svelte-add</a>.
50+
</p>
51+
52+
<Blockquote>
53+
<div>
54+
Ongoing investigation to support non-Tailwind projects is being investigated, including
55+
using <a href="https://unocss.dev/" target="_blank">UnoCSS</a> or vanilla CSS, but they are
56+
undocumented and unsupported at this time.
57+
</div>
58+
</Blockquote>
6659
</div>
67-
<Code source={`npx svelte-add@latest tailwindcss`} language="sh" />
6860
{:else if selectedTab === 'manual'}
6961
<div>
7062
Follow the Tailwind <a href="https://tailwindcss.com/docs/guides/sveltekit" target="_blank">
@@ -77,6 +69,33 @@
7769
{/if}
7870
</div>
7971

72+
<h2>Install package</h2>
73+
74+
<div>Install <code>layerchart</code> package</div>
75+
<Code source={`npm install layerchart`} language="sh" />
76+
77+
<Blockquote>
78+
<div>
79+
<div class="mb-1">
80+
Depending on the example, you will typically need additional <code>d3</code> packages such
81+
as <code>d3-scale</code> and <code>d3-array</code>
82+
</div>
83+
<Code source={`npm install d3-scale d3-array`} language="sh" />
84+
</div>
85+
</Blockquote>
86+
87+
<div>Update LayerChart components to <code>tailwind.config.cjs</code> content</div>
88+
<Code
89+
source={`module.exports = {
90+
content: [
91+
'./src/**/*.{html,svelte}',
92+
'./node_modules/svelte-ux/**/*.{svelte,js}',
93+
'./node_modules/layerchart/**/*.{svelte,js}' // <--- Add this
94+
],
95+
};`}
96+
language="js"
97+
/>
98+
8099
<h2>Usage</h2>
81100

82101
<p>LayerChart components can be easily imported into your project.</p>
@@ -100,10 +119,10 @@
100119
</p>
101120

102121
<p>
103-
The examples do not currently show the importing of LayerChart components, utilties, external
122+
The examples do not currently show the importing of LayerChart components, utilties, or external
104123
libraries (i.e.<code>{'<script>'}</code>
105-
block). You can view the full page source by clicking on **Page source** at the top of each examples
106-
page. This will show you all of the imports used for that page.
124+
block). You can view the full page source by clicking on <strong>Page source</strong> at the top
125+
of each examples page. This will show you all of the imports used for that page.
107126
<Blockquote>
108127
<div>
109128
<strong>Note:</strong> This site is built directly from LayerChart's codebase and does not

0 commit comments

Comments
 (0)