Coder Social home page Coder Social logo

andrewmacmurray / elm-tachyons-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 0.0 16 KB

Simple setup for Elm and Tachyons

License: MIT License

CSS 75.47% Elm 16.67% JavaScript 2.88% HTML 4.98%
elm postcss tachyons boilerplate elm-boilerplate

elm-tachyons-boilerplate's Introduction

Elm Tachyons Boilerplate

Simple setup for Elm and Tachyons

Why?

Elm and Tachyons are great for building UIs

Tachyons - "Create fast loading, highly readable, and 100% responsive interfaces with as little css as possible."

Elm - "A delightful language for reliable webapps."

Both also have low setup requirements to start developing with

for elm:

> elm reactor

and go visit localhost:8080

and for tachyons:

add this to your html file

<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/tachyons.min.css"/>

These setups are great for playing around with ideas, but once you need more control you're left with a few caveats

  • elm reactor doesn't support adding ports (i.e. no external JavaScript)
  • adding a custom stylesheet means appending it at runtime inside the body
  • customising tachyons properties like colors and spacing means manually overriding classes

This boilerplate is a relatively minimal setup, designed to get you off to a quick start using both of them together but with finer control over customising each

How?

For Elm: elm live

A flexible dev server for Elm, Live reload included

elm live compiles elm code, watches for changes and serves the app from the public folder on localhost:8000

For Tachyons: postCSS

PostCSS - "A tool for transforming CSS with JavaScript"

Tachyons has some fantastic default styles, but sometimes you want to customise those defaults.

The boilerplate uses postCSS to bundle all the individual tachyons modules together in src/css/index.css and apply custom variables from the other files in src/css/. The boilerplate uses a fork of Tachyons called Tachyons Custom to give easy access to all the css variables (like colors, widths etc).

Get Started

Run css and elm in watch mode:

$ npm run dev

Build css and elm bundles once:

$ npm run build

In dev mode the browser will open if there are no compile errors, and show localhost:8000 with your app running

Testing

An elm test setup has been added to the tests directory, to run make sure you have elm-test cli installed

$ npm install -g elm-test

and run

$ elm test

Contributions / suggestions are welcome, please leave an issue

elm-tachyons-boilerplate's People

Contributors

andrewmacmurray avatar

Stargazers

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

Watchers

 avatar  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.