Giter VIP home page Giter VIP logo

Comments (24)

refacrot avatar refacrot commented on May 18, 2024

Are you going to add syntax highlight for *.cjsx files (Coffee Script React)? That would be cool. Thanks.

from babel-sublime.

miklschmidt avatar miklschmidt commented on May 18, 2024

With this deprecation, support for CJSX dissappeared. All of my files now look like shit. Is there any chance you will support CJSX aswell?

from babel-sublime.

vegetableman avatar vegetableman commented on May 18, 2024

CJSX :(

from babel-sublime.

zertosh avatar zertosh commented on May 18, 2024

I'm afraid that I have no plans of adding CJSX support since babel doesn't support coffeescript syntax. Maybe @jsdf can take old CJSX syntax definitions and maintain them?

from babel-sublime.

dashed avatar dashed commented on May 18, 2024

Kinda surprised by this deprecation.


@JakovlevDS @miklschmidt @vegetableman

You guys could just copy and paste the following as a new sublime package (or into your sublime user folder): https://github.com/reactjs/sublime-react/tree/ec17f5dfd00eaa326dc299a4febd46cac21e7904/syntax/jsx-coffee


@zertosh What do you mean by "bring back snippets"?

from babel-sublime.

zertosh avatar zertosh commented on May 18, 2024

@dashed I'm going to add back the React snippets and some new ES6 ones as a separate package so they can be opt-in and independent of the syntax definition. https://github.com/babel/babel-sublime-snippets

from babel-sublime.

jessepollak avatar jessepollak commented on May 18, 2024

Just adding in my support for CoffeeScript support! Thanks for your time and effort :)

from babel-sublime.

dstauffer avatar dstauffer commented on May 18, 2024

cjsx :(

from babel-sublime.

jgebhardt avatar jgebhardt commented on May 18, 2024

FYI sublime-react in its current state already/still provides snippets. I'm not sure it's worth duplicating that effort, unless your focus is making them customizable based on your transform configuration. Not everyone using snippets is using Babel.

from babel-sublime.

jgebhardt avatar jgebhardt commented on May 18, 2024

Re: CJSX, I'd encourage the coffeescript community to maintain a separate project altogether. Supporting both languages in sublime-react was –in hindsight– not a great move, since all of React, JSX and ES6 tend to introduce changes at different points in time. I realize that this is an inconvenient transition for coffeescript users, but it should make future upgrades easier for both sides.

from babel-sublime.

zertosh avatar zertosh commented on May 18, 2024

@jgebhardt We had snippets but then I removed them (see #31). I've been meaning to make a package just for them, now seems like a good time.

As for CJSX, I'd be more than happy to add a link to whatever project takes over it.

from babel-sublime.

jgebhardt avatar jgebhardt commented on May 18, 2024

@zertosh I understand they were removed, but sublime-react already provides snippets (actually, since removing the syntax in favor of Babel, that's all it provides). I don't plan on removing the remaining package, as many people are using it specifically for snippets.

What improvements do you envision babel-sublime-snippets to provide over sublime-react?

from babel-sublime.

zertosh avatar zertosh commented on May 18, 2024

@jgebhardt More ES6 specific stuff like import, something for arrow functions, etc. And as far as React stuff, things like import React, {PropTypes} from 'react;, a skeleton for React ES6 classes, etc.

I based the original snippets on what was on sublime-react, but I switched them to using ES6 syntax, like short method definitions. They're all listed here https://github.com/babel/babel-sublime/blob/master/SNIPPETS.md.

from babel-sublime.

n1ghtmare avatar n1ghtmare commented on May 18, 2024

The deprecation was extremely annoying. Why can't we have both babel and reactjs (seriously, there is no legitimate reason to completely break it - sure stop supporting it/working on it, but don't just make it stop working)? It took me a while to even realize there was a deprecation, I had to look at the repo and see the latest commit.
/rant

from babel-sublime.

miklschmidt avatar miklschmidt commented on May 18, 2024

@n1ghtmare i agree, it's not cool deprecating (actually not deprecating, directly removing without warning) something without a proper substitution. Is there anyone with experience in syntax definitions who could maintain a new repo? If not i'll take a look at throwing together a repo and sublime package, but i have no idea what i'm doing.

from babel-sublime.

chrisvfritz avatar chrisvfritz commented on May 18, 2024

As it appears that CJSX will never be supported in this package, I recommend migrating our efforts to aponxi/sublime-better-coffeescript.

from babel-sublime.

alanrubin avatar alanrubin commented on May 18, 2024

It is definitely not cool to wake up one morning and seeing your cjsx files in sublime look like plain text files without having any proper feature substitution. Before deprecating something unexpectedly I would expect authors to think about all user current using the plugin and giving them time to adapt accordingly. Thanks for taking them into account next time.

from babel-sublime.

n1ghtmare avatar n1ghtmare commented on May 18, 2024

@alanrubin I absolutely agree, that was definitely not cool. I ended up setting auto_upgrade to false and restoring the Packages folder.

from babel-sublime.

zertosh avatar zertosh commented on May 18, 2024

@alanrubin @n1ghtmare The repo is still there. All you have to do is clone it and point it to the commit before the deprecation.

git clone [email protected]:reactjs/sublime-react.git
cd sublime-react
git checkout ec17f5d

from babel-sublime.

n1ghtmare avatar n1ghtmare commented on May 18, 2024

@zertosh Yep, thanks, that's what I did, I've created a fork (then reverted the changes) and added it as a source to Package Control. Then set auto_upgrade back to true.

from babel-sublime.

kwood avatar kwood commented on May 18, 2024

I've got a package hosted here, with the non-syntax highlighting stuff removed:
https://github.com/Guidebook/sublime-cjsx

You can add this as a repo manually.

Also improved the highlighting a wee bit -- it wasn't highlighting HTML attributes in the sublime-react version

from babel-sublime.

chrisvfritz avatar chrisvfritz commented on May 18, 2024

For those unaware, adding @kwood's repo manually involves:

  1. Cmd/Ctrl+P > Package Control: Add Repository > https://github.com/Guidebook/sublime-cjsx
  2. Cmd/Ctrl+P > Package Control: Install Package > sublime-cjsx
  3. Open a *.cjsx file
  4. View > Syntax > Open all with current extension as... > CJSX

from babel-sublime.

vegetableman avatar vegetableman commented on May 18, 2024

Thanks for sharing the detailed steps. @chrisvfritz . you rock 👍

from babel-sublime.

liorbrauer avatar liorbrauer commented on May 18, 2024

Thank you @kwood @chrisvfritz, this is VERY helpful!

from babel-sublime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.