项目作者: collardeau

项目描述 :
Svelte with TailwindCSS starter template
高级语言: JavaScript
项目地址: git://github.com/collardeau/svelte-tailwind-template.git
创建时间: 2019-09-29T16:16:24Z
项目社区:https://github.com/collardeau/svelte-tailwind-template

开源协议:

下载


Svelte App with Tailwind CSS

This is a project template for Svelte apps.

It uses the default starter template, and adds TailwindCSS via postcss. Autoprefixer is included. Production builds are optimized with purgecss.

To create a new project based on this template using degit:

  1. npx degit collardeau/svelte-tailwind-template my-svelte-app
  2. cd my-svelte-app

Note that you will need to have Node.js installed.

Get Started

Install the dependencies…

  1. cd my-svelte-app
  2. npm install

…then start Rollup:

  1. npm run dev

Navigate to localhost:5000. You should see your app running. Edit a component file in src, save it, and reload the page to see your changes.

By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv commands in package.json to include the option --host 0.0.0.0.

Tailwind Usage

Simply use Tailwind classes in your Svelte components:

  1. <p class="text-green-500">Svelte + TailwindCSS</p>

To learn more about TailwindCSS, check out this wonderful series of videos by its author, Adam Wathan.