Code Monkey home page Code Monkey logo

elodin-old's Introduction

Deprecated: This repository has been renamed and deprecated. There's something new coming soon that'll be named Elodin instead, but it provides similar benefits & ideas, just in a complete different way.

Elodin

Elodin is a plugin-based quality and optimization tool for CSS in JavaScript libraries.
It helps to write bulletproof and valid styles and pushes developer experience to a next level.

Elodin is built on top of Bredon which is a modern CSS value compiler.

TravisCI Test Coverage npm downloads npm version Gitter

Support Us

Support Robin Frischmann's work on Fela and its ecosystem (Elodin) directly via Patreon.

Or support us on Open Collective to fund community work. This also includes Elodin as well.
Thank you to all our backers!

Installation

yarn add elodin

You may alternatively use npm i --save elodin.

Features

  • Validation using bredon-validate
  • Most Plugins are fixable
  • Detailed Warnings

The gist

import elodin from 'elodin'
import validation from 'elodin-plugin-validation'
import longhand from 'elodin-plugin-longhand'

// create a preconfigured linter
const process = elodin({
  plugins: [
    longhand(),
    validation({
      removeInvalid: true
    })
  ],
  fix: true
})

const style = {
  padding: '20px 0 10px 5em',
  fontSize: '15pt',
  lineHeight: '1.2em',
  width: 'solid'
}

const warnings = process(style)

// using the fix option will automatically fix warnings
style === {
  paddingTop: '20px',
  paddingBottom: '10px',
  paddingLeft: '5em',
  fontSize: '15pt',
  lineHeight:  '1.2em'
}

Catching Warnings

If the fix option is disabled, Elodin will return a list of warning for every style object.

Taken the above example:

warnings.forEach(warning => console.log(warning.description))
// => The value "solid" is not valid in combination with "width".

Documentation

Coming soon.

Support

Got a question? Come and join us on Gitter!
We'd love to help out. We also highly appreciate any feedback.

Contributing

This project exists thanks to all the people who contribute.

We highly appreciate any contribution.
For more information follow the contribution guide.
Also, please read our code of conduct.

License

Elodin is licensed under the MIT License.
Documentation is licensed under Creative Common License.
Created with โ™ฅ by @rofrischmann.

elodin-old's People

Contributors

robinweser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elodin-old's Issues

Roadmap

The following checklist is basically the ToDo-list for first stable release candiate.

  • Plugin-API
  • Plugin Documentation

Plugins

We want to ship some basic default plugins that cover most of the modern use cases. Each one contains one or multiple configurable "rules" to ensure quality.

  • shorthand
  • longhand
  • vendor-prefix
  • unit
  • color
  • compatibility
  • validation

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.