depercolator icon indicating copy to clipboard operation
depercolator copied to clipboard

detect jsx code in *.coffee file and convert to *.jsx file

Open milahu opened this issue 3 years ago • 0 comments

Expected behavior

when jsx code is present in a *.coffee file (yes it should be a *.cjsx file) depercolate should write a *.jsx file

Observed behavior

*.coffee -> *.js *.cjsx -> *.jsx

Steps to reproduce

depercolate file.coffee the output is valid jsx code, just the file extension is wrong

file.coffee:

f = () ->
        <br/>

file.js (should be file.jsx):

const f = () => <br />;

Version

$ pnpm list -g depercolator
depercolator 0.5.0

Quickfix

node --check file.js || mv file.js file.jsx

milahu avatar Aug 17 '20 14:08 milahu