GithubHelp home page GithubHelp logo

orbit's Introduction

Orbit

What

Speed up e-mail development with SCSS, integrated litmus testing, file hosting, translations and whatnot. Inspired by foundation-emails-template

Configure

Create a config.json file in the root of your project based on this template:

{
    "projectName": "projectName",
    "ftp": {
        "host": "host.be",
        "user": "userName",
        "pass": "1234",
        "dest": "/path/on/server",
        "baseUrl": "http://host.be/projectName/"
    },
    "litmus": {
      "username": "[email protected]",
      "password": "1234",
      "url": "https://test.litmus.com",
      "applications": ["ol2003","ol2007","ol2010","ol2011","ol2013","chromegmailnew","chromeyahoo","appmail9","iphone5s","ipad","android4","androidgmailapp"]
    },
    "mail": {
      "to": [
        "[email protected]"
      ],
      "from": "Company name <[email protected]",
      "smtp": {
        "auth": {
          "user": "[email protected]",
          "pass": "12345678"
        },
        "host": "smtp.domain.com",
        "secureConnection": true,
        "port": 465
      }
    }
  }

Available commands

npm run start

  • Compiles SCSS
  • Builds templates
  • Minifies images
  • Starts local development server
  • Runs watchers on SCSS and templates
  • Sets the image basepath to a local directory

npm run build

  • Compiles SCSS
  • Builds templates
  • Inlines css in html
  • Minifies images

By default the build task builds all translations, you can build a specific mail by running this task with a language flag, i.e.: npm run build -- --lang nl

npm run zip

  • Same as the build task but also creates a zip package of the html and images

npm run test

  • Compiles SCSS
  • Builds templates
  • Minifies images
  • Uploads images to specified ftp server
  • Sets the image base path to the specified ftp server
  • Sends a test of all mails to litmus

Again you can test a specific version by adding a language flag npm run test -- --lang nl

npm run mail

  • builds the mail
  • sends a test to a specified address in config.json

By default the mail task sends a test mail of all .html files in the dist folder, you can send a specific mail by running this task with a language flag, i.e.: npm run mail -- --lang nl

Layout

Orbit has the twigjs templating language built in, also the Inky templating language is available, more info: here

Contributing

We love contributions! You can take a look at our Contribution Guide to get you started. If you're submitting a pull request, please follow the guidelines in the Submitting pull requests documentation.

orbit's People

Contributors

fvkvn avatar devolicious avatar

Stargazers

Ibe Vanmeenen avatar Kris Pypen avatar Jan Bevers avatar  avatar

Watchers

Daan Poron avatar Kris Pypen avatar  avatar James Cloos avatar  avatar  avatar

Forkers

fvkvn

orbit's Issues

[RFC] Rename the twig asset function

If I remember correctly we decided to name this function 'asset' to make it consistent with the Symfony asset function.

This one does not act like the Symfony one at all though. It fetches files from the img/language folder.

I would rename this to something that resembles that:

{{image("funky-stuff.jpg")}}

[RFC] Add an option to the asset function to not use the language

At the moment the asset function is hardcoded to look for files relative to the img/language folder. Sometimes an image is shared across languages, so it would be nice if it could just look relative to img folder.

A simple boolean flag might be enough:

{{asset('whodis.png', false)}}

I'm not sure what would make the most sense as the default.

[RFC] Make it possible to retrieve configuration values in template files

At the moment there is no easy way to add reusable configuration (for example urls) that is independent of the language.

For now I added a config property to the translations, but I don't like that this needs to be duplicated.

A {{config('some.data')}} function maybe?

Should this be overridable per language?

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.