News for hackers. Stuff that matters.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by the8472 on Sunday July 26, 2015 @10:38AM (#9951153)
> * better editors for HTML/CSS, maybe even some decent WYSIWYG

Editors? How about an IDE.

In the java environment I can manage an application container, profiler, debugger, compiler, packager, test suite all from one application.

Also included: near-omniscient auto-complete, hot-code replace, incremental building, dependency fetching, visual version control, automatic refactoring, deployment and many other conveniences I'm taking for granted. Hell, I could even file tickets from my IDE if I wanted to.

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by joesmo on Sunday July 26, 2015 @12:14PM (#9951419)
WebStorm (https://www.jetbrains.com/webstorm/). Or if you use other languages as well, check out any of Jetbrains' IDEs: https://www.jetbrains.com/

I haven't found a better IDE for any language yet.

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by hex13 on Sunday July 26, 2015 @03:56PM (#9952022)
I think that WebStorm is decent JavaScript IDE but if we 're talking about editing HTML/CSS/Sass, WebStorm is not any better than plethora of other text editors.

IMO basic problem lies in fact that we're still trying to edit hierarchical tree structures of HTML and CSS/SCSS as a plain text instead of editing underlying tree structure.

I think that good HTML/CSS editor should operate on tree and every CSS rule and every property should be object rather than plain text. That would allow to more natural editing and faster code modification/refactoring (I am frontend developer but I hate writing CSS/HTML by hand. It feels like using punch cards... Better editor could allow to do things faster and more effective).

I was looking for structural (and projectional) editor for HTML/CSS and didn't find any. So I started making my own (here is prototype: https://www.youtube.com/watch?v=yRwx09bAT08 )

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by Zombieball on Sunday July 26, 2015 @10:55PM (#9953100)
I agree with edwinnathaniel, IntelliJ with its browser JavaScript debugging plugins is pretty awesome and I find it a fantastic JavaScript IDE.

I am curious what use cases you have for editing in the fashion of your demo video? I don't find myself frequently wanting to view just fonts in a css file. I either have specific rules I want to edit, or I pull up reused fonts and colours into re-used classes (or less variables) and just edit that one spot.

Why would you want to view just colours? Or just fonts? BTW, I am not trying to put down your idea, infact I think it's very interesting concept to work more closely with the tree structures.

Edit: as I think about the idea, it would be awesome if I could click on any html element in a file and it would be able to statically analyze and show all applicable css selectors. Although I frequently use angular and dynamically applied css classes.

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by hex13 on Monday July 27, 2015 @05:54AM (#9954262)
> or I pull up reused fonts and colours into re-used classes (or less > variables) and just edit that one spot.

good editor could pull up reused fonts and colours automatically (detecting if they the same in various nodes).

> I either have specific rules I want to edit

Yes, I'm also making possibility of filtering by specific rules and finding by CSS selector (in HTML also)

And different filters are just a part of the editor. Actually, my first idea was creating something that would allow to make quick changes that are super easy when operating on tree, but you must do them by hand in text editors (e.g. operations like "move to parent", "wrap this HTML element in new `div` element etc.).

I also want editor to be operable without keyboard/mouse switching. And because when I make websites I often use mouse to test in browser all functions, I want good mouse support and be able to change e.g. top from 0px to 10px using only mouse. This is possible in e.g. DevTools, why not to put this feature in editor?

> Edit: as I think about the idea, it would be awesome if I could click on

> any html element in a file and it would be able to statically analyze and

> show all applicable css selectors.

Yes. It would be nice, although I didn't solve this from technical perspective yet.

But for now I think about something like in Brackets - you edit HTML and could edit styles in place without switching to the other file.

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by Zombieball on Monday July 27, 2015 @08:03PM (#9958799)
These are some great ideas. There are little features in DevTools that I wish my IDE had (or I am not aware of the features if they do).

Be sure to post anything awesome you create to HN!

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by hex13 on Monday July 27, 2015 @08:44PM (#9958917)
I'll do :) As soon as my editor is advanced enough to show.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by edwinnathaniel on Sunday July 26, 2015 @06:53PM (#9952486)
Decent JS IDE?

It's the best one I've tried out there. Literally. No other text-editor-with-plugins (VIM, Emacs, Sublime, Atom) or IDEs come anywhere close.

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by deckar01 on Sunday July 26, 2015 @03:17PM (#9951923)
Webstorm on OSX actually became more of a burden to use as my projects grew large. Excessive memory usage and crashing forced me to dump it in favor of Sublime Text. It's version history saved my butt a few times, but it was nothing that better Git habits couldn't solve.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by kriro on Sunday July 26, 2015 @11:14AM (#9951244)
WebStorm is pretty good already imo.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by ralfn on Sunday July 26, 2015 @12:02PM (#9951379)
Some of those features are only possible because Java is statically typed. They couldnt exist in the same way for "pure" JavaScript.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by recursive on Sunday July 26, 2015 @12:11PM (#9951404)
But they can exist in a statically typed extension to javascript. See typescript in Visual Studio.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by joshuapants on Sunday July 26, 2015 @01:24PM (#9951618)
I've been playing with Typescript in both Visual Studio and Visual Studio Code and Intellisense is great.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by MrBuddyCasino on Sunday July 26, 2015 @05:22PM (#9952236)
Facebook is doing something that enables better IDE support for JS, so static typing isn't absolutely required, it just makes it a lot easier. I forgot the projects name though, the IDE part was also not open sourced back then.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by feedjoelpie on Sunday July 26, 2015 @05:37PM (#9952276)
Their optional typing for JS is called Flow, and they've open sourced an IDE of sorts (a suite of Atom plugins) called Nuclide (http://nuclide.io/).
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by MrBuddyCasino on Monday July 27, 2015 @04:12AM (#9953978)
That was the one, thanks.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by rejschaap on Monday July 27, 2015 @08:13AM (#9954662)
I have never seen anyone successfully bolt type-checking onto an existing language. It is always painful to use. It usually requires ugly added syntax and you need a special compiler if the language isn't flexible enough.

Why not just use a different language altogether? One that was designed with static type checking from the ground up?

Maybe Facebook likes the pain, they also pushed PHP further than anyone else was willing to. Burning insane amounts of resources with a somewhat disappointing result.

Re:The Hitchhiker's Guide to Modern JavaScript Tooling by starik36 on Monday July 27, 2015 @03:00AM (#9953784)
Give Visual Studio a try (particularly v2015). It's pretty good at auto-complete at the very least. And you could still file tickets from it as well.
Re:The Hitchhiker's Guide to Modern JavaScript Tooling by pekk on Sunday July 26, 2015 @09:16PM (#9952888)
An IDE is not a fundamentally different thing from an editor, and certainly not a superior one.