Giter Site home page Giter Site logo

yatas's Introduction

YATAS - Yet Another Tailwind Apline Starter

YATAS Logo

Minimal 11ty starter project that build css with tailwindcss cli and esbuild for javascript.

Deploy to Netlify

Stack

  • 11ty v2
  • TailwindCSS v3
  • Apline.js v3

Install

npm install

Local dev

npm run start

Build

Minified production build

npm run build

Assets versioning

This starter includes a small js script to which can add a hash to your assets when building for production builds. The script will look for files to include a hash (based on the md5 of the built file content) eg: styles.734a7607648afdb.css instead of styles.css.

The entry point for matching regular file path to versionned path is generated as an 11ty global data object in _data/hash.json with the simple structure

{
  '/path/to/resource.css': '/path/to/resource.hash.css'
}

In your 11ty template, you can then simply retrieve the versioned path from the array {{ hash['/path/to/resource.css'] | url }}

If you want to add other assets to this generated data array, simply include the path in the assets const in the hash.js file in the root directory (files listed below are already included).

const assets = [
  '/css/styles.css',
  '/js/scripts.js'
];

yatas's People

Contributors

fschoenfeldt avatar yhaefliger avatar yhaefligsib 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.