This guide aims to get you up and running with Grasp in as little time as possible. If you want a more in depth introduction, check out the documentation.
- Install node.js.
- Install Grasp:
sudo npm install -g grasp
. - Run
grasp --help
to take a look at the help. - Choose your favourite file and do
grasp if <your file>.js
- you just found all the if statements in your file! - Run
grasp if.test <your file>.js
- now you’ve selected their tests! - Run
grasp --help syntax
and choose another type of statement. - Run
grasp <your statement type> <your file>.js
and search for that statement in your file. - Read the blog post on Refactoring your JavaScript code using Grasp for more examples.
- Finally, read the documentation for more information.