A couple of weeks ago I published a post on Refactoring your JavaScript code with Grasp which received many hits and was widely shared, greatly increasing interest in Grasp! Along with being featured in JavaScript Weekly issue #163, many people tweeted about Grasp - here is a small selection:
Grasp.js is fantastic for JS refactoring: http://t.co/qsEGWBubHg & there's a Sublime plugin for it: https://t.co/z8fMF9EmfA. <3z @gkzahariev
— Addy Osmani (@addyosmani) January 14,
2014
Ah this looks interesting! Grasp is a command line tool to search and replace your JavaScript code, the smart way. http://t.co/BozFKvoObM
— Smashing Magazine (@smashingmag) January 14, 2014
Grasp.js: structural JavaScript-aware search/replace http://t.co/H7zEpnLZzo Fantastic for refactoring
— Paul Irish (@paul_irish) January 8, 2014
Refactoring Your JavaScript Code with Grasp: http://t.co/3e3SVbmagJ
— JavaScript Daily (@JavaScriptDaily) January 11, 2014
With all the increased interest, several bugs were found and reported. I’ve fixed these bugs and have released Grasp 0.2.1:
0.2.1
Grasp 0.2.1 is a minor release, consisting mostly of bug fixes.
Install with npm install -g grasp
(or see install page).
Update with npm update -g grasp
.
Changes
- Fixed problem parsing anonymous function #8
- Allowed
.prop
access on compound selectors in squery, eg. allowedif[test=call].else
- Fixed not able to exclude template (.ejs) files #11
- Fixed bug when replaced variable is used more than three times on one line #9
- Fixed avoid removal of end of file newlines #15
- Added
textFormat
option when using as a library