-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for more file extensions #11
Comments
I am not sure I understand this request. If you are thinking of non-CFML files there are plenty of formatters already out there (such as prettier). If you are thinking of |
It was |
@jcberquist Outputting HTML, CSS, or JS isn't unique to CFMs. How would CFFormat handle this CFC? <cfcomponent output="true">
<cffunction name="foo" output="true">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<style>
##body {
color: red;
}
</style>
<cfoutput>
<span id="body">This is a <b>test</b></span>
</cfoutput>
</cffunction>
</cfcomponent> |
@mbandizzle: Thank you for the clarification. I am glad you were happy with the results for The reason I drew the distinction with cc: @bdw429s |
It would be handy to have an optional flag to attempt to format .cfm files. Most "non-view" cfm files I use as includes and would benefit greatly from this fantastic plugin. UPDATE: cfformat works nicely on .cfm files renamed with a .cfc extension. This feature would be very useful. |
@chapmandu: based on what you said, I assume your |
I would be happy to run cfm files at my own risk, one can easily unstage if it goes terribly wrong. I have a workaround script that renames cfm to cfc, applies cfformat then reverts names.. |
Just a polite bump.. I'd really like to be able to watch or format a directory containing cfm files.. You can see here how useful it would be: https://github.com/cfwheels/cfwheels/tree/master/wheels/controller |
@chapmandu I have added the ability to format cfm files in |
I appreciate the update. It's safe to say I won't be formatting any view files. 👍 |
It appears this update has some problems. Trying to format a .cfm file throws the exception below:
|
Can you share the file you were trying to format? |
Also, are you running this on Linux? |
Yes, Linux Ubuntu 20.04 File contents below using command:
|
Thanks! I will take a look. Can you format any files - or do they all break on this version? |
cfcs are fine, but any cfm file seems to throw this same exception. I've tried several different cfm files. |
@chapmandu it looks to me like I may have uploaded the incorrect linux binary with the |
That did the trick.. Thanks! Working nicely. I also discovered that I don't need the |
It would be great to be able to add additional file extensions to run through the same formatting that .cfc gets now.
The text was updated successfully, but these errors were encountered: