0.2.8 • Published 9 years ago

javascript-refactoring v0.2.8

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

Javascript-Refactoring Tools (pr� early alpha version)

very ALPHA version

This is a very early version to something that would become very usefull. The main functionality, the "Instrument all function" is not working well with ES6. I didn't have time to make this more stable. If you are using ES5 this command may work well.

All help is appreciated.

Commands

ctrl + l, r Instrument all function (requires debug-print)

Very useful to trace what functions are called in a node.js app. For now, only instrument functions, changing your original code. Then after see the result you can get your original code back with git or UNDO.


ctrl + l, l Insert console.log with selected text

Insert console.log that was inserted with the last command


ctrl + l, c Removes all console.log

Removes all console.log that was inserted with the last command

1. Install debug-print to your node project

$ npm i debug-print

2. run your app with DEBUG=* env

# inline ENV
$ DEBUG=* node your_app_name.js

# or call gulp/grunt/...
$ DEBUG=* (gulp| grunt| anything)

# or export ENV
$ export DEBUG=*
$ node your_app_name.js

developers


clone all

echo '-----------------------------------------------------'
echo 'creating ast folder...'

mkdir ast
cd ast

echo '-----------------------------------------------------'
echo 'Cloning all repos...'

git clone git@github.com:saitodisse/atom-javascript-refactor.git

# clone and link all dependencies
./scripts/clone-and-link

how to install from code

git clone git@github.com:saitodisse/atom-javascript-refactor.git
cd atom-jsRefactoring-tutorial
apm link

dependencies