GithubHelp home page GithubHelp logo

ralphtq / elm-land-tailwind Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dz0ny/elm-land-tailwind

0.0 0.0 0.0 117 KB

Home Page: https://dz0ny.github.io/elm-land-tailwind/

JavaScript 18.13% CSS 1.26% Elm 80.60%

elm-land-tailwind's Introduction

Using Tailwind with Elm-land

This project demonstrates how to use Tailwind with Elm-land using yarn.

Installation

To install this project, follow these steps:

  1. Clone the repository to your local machine.
  2. Install the necessary dependencies by running yarn install.

Usage

To use this project, follow these steps:

  1. Start the development server by running yarn dev.
  2. Navigate to http://localhost:1234 in your web browser.
  3. Edit the files in the src directory to modify the application.
  4. See the changes in your browser as you save the files.

Configuration

The trick to using Tailwind with Elm-land is to configure Tailwind to look for changes in files in addition to the usual src location and look for them in the .elm-land directory. This is done in the tailwind.config.js file:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./src/**/*.{js,elm,ts,css,html}",
    ".elm-land/**/*.{js,elm,ts,css,html}"
  ],
}

This configuration tells Tailwind to look for Elm files in the src and .elm-land directories and the usual file types.

In addition to configuring Tailwind, you must insert index.css into the interop.js file. This can be done by adding the following line to the interop.js file. This way Vite knows to transpile and bundle the CSS file:

import './index.css';

Contributing

To contribute to this project, follow these steps:

Fork the repository. Create a new branch for your changes. Make your changes and commit them. Push your changes to your fork. Submit a pull request.

elm-land-tailwind's People

Contributors

dz0ny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.