Tip:All code or commands can be double-clicked to select the word, three clicks to select the line.
Svelte and Tailwind have been configured for direct installation.
npm i stdf
# or
yarn add stdf
# or
pnpm i stdf
<!-- Button Demo -->
<script>
import { Button } from 'stdf';
</script>
<Button>Default</Button>
Use the Vite example to create the project here. See Vite documentation.
npm create vite@latest
Follow the prompts to create a project.
See Tailwind CSS documentation。
Install Tailwind CSS and other dependencies, then generate tailwind.config.js and postcss.config.js files.
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Add the template file to tailwind.config.js.
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,svelte}'],
theme: {
extend: {},
},
plugins: [],
};
Add Tailwind CSS to the entry CSS file, such as./src/index.css, and import the CSS file in the entry file main.js.
Start the project.
npm run dev