6 Replies Latest reply on Apr 28, 2011 11:18 AM by Harbs.

    Why using .JSX?

    fabianmoronzirfas Level 1

      Hi,

       

      i have a basic question. Is it of any importance to use the .jsx extension instead of the .js?

       

      Best

       

      :F

        • 1. Re: Why using .JSX?
          emerasoft.srl Level 1

          Hello,

           

          I think you could use ".js" extension instead of ".jsx" but I cannot find any advantage on this (BTW, I tried importing some scripts on the InDesign scripts panel with the ".js" extension and they work without any problem).

           

          ".jsx" stays for ExtendScript which is - as you know - a "special" version of Javascript, the same way as ActionScript (.as) is again a "special" version of Javascript too.

           

          Best,

          Luca

          1 person found this helpful
          • 2. Re: Why using .JSX?
            Harbs. Level 6

            js will work.

             

            The main advantage to using jsx is in regard to file associations. jsx is associated with the ESTK, so if you open a jsx file it will open in ESTK. js files very often have other associations (such as Dreamweaver)...

             

            Harbs

            1 person found this helpful
            • 3. Re: Why using .JSX?
              fabianmoronzirfas Level 1

              So it is only the file association with the ESTK?

               

               

              The advantage for me in .js is

              - OSX Quicklook works with .js

              - Git seems to have (sometimes) problems with .jsx

               

               

              I thought maybee there is some tiny hidden but super important feature when using. jsx

               

               

               

              Thanx a lot

               

              :F

              • 4. Re: Why using .JSX?
                Harbs. Level 6

                JSX files created by BBEdit or TextWrangler also work with Quicklook...

                 

                Harbs

                • 5. Re: Why using .JSX?
                  fabianmoronzirfas Level 1

                  Really?

                  The JSX files I produce with TextMate and with the ESTK don't work with Quicklook (OSX 10.6.7).

                  Could for some reason the encoding be a problem?

                  I tried to change the encoding, but the terminal says always: charset=us-ascii

                   

                  Or is there some other way to make the system treat the .jsx files like .js files?

                  I already know how to associate the extension with a program (e.g. TextMate) that works.

                  But the QuickLook problem is anoying me.

                   

                  :F

                  • 6. Re: Why using .JSX?
                    Harbs. Level 6

                    I once started looking into making a Spotlight plugin for jsx files (I care about Spotlight more than I care about Quicklook). When I discovered that TextWrangler and BBEdit make them indexible, I gave up on that exercise. BBEdit is my preferred app for writing scripts anyway.

                     

                    You only need them to save the file once for them to be searchable and openable by Quicklook. I'm not sure what does it, but it's one of the other pieces of metadata which does the trick...

                     

                    Harbs