nakamuray / sq

sq - Stream jQuery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sq - Stream jQuery

sq is a tool to execute coffee script expression including jquery to stdin stream or speciefied URL/file.

Install

$ npm install

Usage

sq  <coffee expression> [URL or filename...]

Example

$ echo '<html><body><h1>Hello World!</h1></body><html>' | sq '$("h1").text()'
Hello World!
$ sq '$("img").map -> this.src' https://jquery.com/
https://jquery.org/resources/members/famous.png
https://jquery.org/resources/members/mediatemple.png
https://jquery.org/resources/members/wordpress.png
https://jquery.org/resources/members/ibm.png
https://jquery.com/jquery-wp-content/themes/jquery/content/books/learning-jquery-4th-ed.jpg
https://jquery.com/jquery-wp-content/themes/jquery/content/books/jquery-in-action.jpg
https://jquery.com/jquery-wp-content/themes/jquery/content/books/jquery-succinctly.jpg
$ sq '$(".entry-title a").map -> $(this).text()' https://api.jquery.com/category/core/ https://api.jquery.com/category/css/
jQuery()
jQuery.holdReady()
jQuery.noConflict()
jQuery.sub()
jQuery.when()
.addClass()
.css()
.hasClass()
.height()
.innerHeight()
.innerWidth()
jQuery.cssHooks
jQuery.cssNumber
.offset()
.outerHeight()
.outerWidth()
.position()
.removeClass()
.scrollLeft()
.scrollTop()
.toggleClass()
.width()

About

sq - Stream jQuery

License:BSD 2-Clause "Simplified" License


Languages

Language:JavaScript 100.0%