All Projects → gregives → eleventy-load

gregives / eleventy-load

Licence: MIT license
Resolve dependencies and post-process files in your Eleventy project

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eleventy-load

eleventy-plugin-social-images
Create dynamic images sized for social media tags for your Eleventy content.
Stars: ✭ 35 (+25%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-unfurl
Unfurl links into rich cards, as seen in places like Slack and Twitter
Stars: ✭ 37 (+32.14%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-prismic
Eleventy plugin and shortcodes to fetch and present Prismic content
Stars: ✭ 39 (+39.29%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-navigation
A plugin for creating hierarchical navigation in Eleventy projects. Supports breadcrumbs too!
Stars: ✭ 88 (+214.29%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-pwa
An eleventy plugin to generate service-worker for PWA. Powered by Google Workbox
Stars: ✭ 46 (+64.29%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-toc
11ty plugin to generate a TOC from page content
Stars: ✭ 45 (+60.71%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-cloudinary
An Eleventy shortcode that allows you to add an image from your cloudinary account
Stars: ✭ 28 (+0%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-metagen
An Eleventy shortcode that generates metadata for Open Graph, Twitter card, generic meta tags and a canonical link.
Stars: ✭ 28 (+0%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-upgrade-help
Helper plugin when upgrading your Eleventy project to a new major version.
Stars: ✭ 33 (+17.86%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-embed-tweet
A plugin for embedding tweets on the server side during build time
Stars: ✭ 24 (-14.29%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-inclusive-language
A linter plugin to check for inclusive language in markdown files.
Stars: ✭ 32 (+14.29%)
Mutual labels:  eleventy, eleventy-plugin
eleventy-plugin-svelte
Eleventy plugin to support svelte templates
Stars: ✭ 40 (+42.86%)
Mutual labels:  eleventy, eleventy-plugin
Parcel
The zero configuration build tool for the web. 📦🚀
Stars: ✭ 39,670 (+141578.57%)
Mutual labels:  assets
Assetchecker
👮Sanitize your Assets.xcassets files
Stars: ✭ 167 (+496.43%)
Mutual labels:  assets
Yii2 Webpack
Yii2 Webpack2 asset management
Stars: ✭ 106 (+278.57%)
Mutual labels:  assets
Unity Moveable Linerenderer
Unity LineRenderers with the simple turbulence
Stars: ✭ 101 (+260.71%)
Mutual labels:  assets
Infinite Scroll Unity
Infinite Scroll is a script extension that allows you to use ScrollRect control as an infinite spinner. It is fast, simple and mobile-friendly way to make lists with thousands of rows.
Stars: ✭ 209 (+646.43%)
Mutual labels:  assets
Androidlibrary
Android library to reveal or obfuscate strings and assets at runtime
Stars: ✭ 162 (+478.57%)
Mutual labels:  assets
Assets
A collection of https://www.freeCodeCamp.org logos and other assets
Stars: ✭ 94 (+235.71%)
Mutual labels:  assets
Typescript Bundle
A Bundling Tool for TypeScript
Stars: ✭ 94 (+235.71%)
Mutual labels:  assets

eleventy-load

Tests npm version npm downloads License Prettier

Wish there was a way to import Sass files as easily as CSS files? Now there is!

Introducing eleventy-load, an Eleventy plugin which resolves dependencies and post-processes files for you. Loading Sass files is just one example: eleventy-load exposes 'loaders' which can process any file including HTML, CSS, JavaScript, images and more. The concept of eleventy-load is very similar to webpack loaders, albeit with infinitely less JavaScript sent to the browser.

Documentation

Visit the eleventy-load website for usage instructions, examples of eleventy-load, a list of loaders and how to write a loader yourself.

Get Started

For more detailed instructions, see the eleventy-load website.

The following example sets up eleventy-load so that you can import Sass files just like you would import CSS files.

  1. Install eleventy-load and any loaders you need.
npm install --save-dev eleventy-load eleventy-load-html eleventy-load-sass eleventy-load-css eleventy-load-file
  1. Add eleventy-load as a plugin and set up rules to process your Sass file.
module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(require("eleventy-load"), {
    rules: [
      {
        test: /\.html$/,
        loaders: [
          {
            loader: require("eleventy-load-html"),
          },
        ],
      },
      {
        test: /\.scss$/,
        loaders: [
          {
            loader: require("eleventy-load-sass"),
          },
          {
            loader: require("eleventy-load-css"),
          },
          {
            loader: require("eleventy-load-file"),
            options: {
              name: "[hash].css",
            },
          },
        ],
      },
    ],
  });
};
  1. Now you can write your Sass in a file and link it in your HTML using a link element!
$massive: 5rem;

body {
  background-color: linen;

  h1 {
    font-size: $massive;
  }
}
<link rel="stylesheet" href="styles.scss" />

It's as easy as that!

Loaders

Loaders can process any file, from a text file to images. See a list of loaders on the eleventy-load website.

Contribution

I'd love some help adding tests to eleventy-load and growing the ecosystem of loaders. If you'd like to contribute, get in touch with me!

Development

  • Clone this repo and run npm install
  • Configure your IDE to run prettier/eslint on save.
  • Run npm run test:watch which will run tests on changed files while you work.
  • Please add tests for any new features. Run npm test to lint, run tests and get a coverage report.
  • Tests will run when you push to remote

It's a pain to manually test changes against a running 11ty instance, especially for different versions. The tests make this simpler by mocking the interface to 11ty for each major version. This gives reasonable confidence that the plugin is compatible with each major 11ty release.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].