Giter Club home page Giter Club logo

js2coffee-widget's Introduction

Synopsis

An embeddable version of js2coffee. How many times have you come across handy javascript snippets only to have to go through the trouble of converting to coffeescript yourself for your own project, or vice versa, coffeescript to javascript?

Well those times are over. This embeddable version of js2coffee allows you to write one code snippet in either javascript or coffeescript and display both versions on your web page! By simply writing either a javascript or coffeescript snippet, this widget will generate the other version of the snippet for you.

Code Example

The js2coffee-widget is self-contained so to utilize it all you have to do is ...

<div class=".j2cw-js" style="height: 250px;">code goes here ;)</div>

By adding a div with either the .j2cw-js or .j2cw-cs and inserting your snippet between the tags you can allow this widget to do the rest!

By specifying either js or cs as an extension of the class name you will specify whether the snippet is written in javascript or coffeescript respectively.

Motivation

Now unlike ever before you can easily and concisely support both javascript and coffeescript snippets in your tutorials and articles without even trying! This was motivated by frequent frustrations caused by doing this conversion by hand multiple times a day.

alt text

Installation

Simply add the following to your <head> tag.

<link rel="stylesheet" href="js2coffee-widget.css">
<script src="js2coffee-widget.js">

And start making snippets!

Note: js2coffee-widget requires jQuery.

js2coffee-widget's People

Contributors

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