Last active
November 22, 2017 12:15
-
-
Save ideiudicibus/effe99851b7aee92fe91ea6228d91a04 to your computer and use it in GitHub Desktop.
convert and remove coffeescript files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I don't like coffeescript syntax and I discovered that I'm not alone. | |
This project does the work: | |
http://decaffeinate-project.org/ | |
usage: | |
# install locally | |
$ npm install -g decaffeinate | |
# convert a single file | |
$ decaffeinate index.coffee | |
# convert a whole project | |
$ decaffeinate src/ | |
# consider also this technique when you want to exclude some directories from the convertion | |
$ find . -name "*.coffee" -not -path "*PATHNAME_1*" -not -path "*PATHNAME_2*" -exec decaffeinate {} \; | |
# remove the .coffee files | |
$ find . -name '*.coffee' -exec rm {} \; | |
# commit the result | |
$ git add -A | |
$ git commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment