Project

putsjs

0.0
No commit activity in last 3 years
No release in over 3 years
Love Ruby's 'puts' syntax? Hate typing 'console.log' everytime you want to print something to the web-browser's console from your Coffecript? Then use putsjs in your rails application. putsjs allows console logging statements to be written as puts statements in your coffescript files and during asset compilation converts them into console.log statements.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

PutsJS¶ ↑

Love Ruby’s ‘puts’ syntax? Hate typing ‘console.log’ everytime you want to print something to the web-browser’s console from your Coffecript? Then use putsjs in your rails application. putsjs is a simple gem that allows browser console logging statements to be written as puts statements in your coffescript files and during asset compilation converts them into console.log statements.

Installation¶ ↑

  1. Add PutsJS to your Gemfile:

    gem 'putsjs'
    
  2. Change directory to your Rails app root and Run bundle installer to install PutsJS:

    bundle install
    

Usage¶ ↑

In your coffescript files just use puts followed by any valid statement to log the statement to the browser’s console.

Example:

  • puts “Rails is awesome!”

  • puts this