News for hackers. Stuff that matters.
Re:Announcing TypeScript 2.7 by Raphmedia on Wednesday January 31, 2018 @04:24PM (#16277683)
Come on, take the time to learn your tools instead of blindly mashing things together.

Step 1 : npm install --save-dev gulp-typescript-babel

Step 2:

var gtb = require('gulp-typescript-babel');

gulp.task('compile', function () { gulp.src(config.typescript) .pipe(gtb({incremental: true, configFile: 'tsconfig.json'}, {presets: ['es2015']})) .pipe(gulp.dest(config.output)) });

Step 3: Enjoy.

Re:Announcing TypeScript 2.7 by ake1 on Wednesday January 31, 2018 @05:20PM (#16278078)
are you not making his point for him?
Re:Announcing TypeScript 2.7 by paulddraper on Wednesday January 31, 2018 @10:38PM (#16279486)
> instead of blindly mashing things together

...immediately mashes a massive number of things together

Re:Announcing TypeScript 2.7 by Raphmedia on Thursday February 01, 2018 @10:00AM (#16282253)
Since when is using two libraries (typescript and babel) considered mashing a massive number of things together?

If you don't want to leverage Gulp to easily automate your build process then don't.

If you don't want to use NPM to download packages then simply download the .zip archive on Github,

Re:Announcing TypeScript 2.7 by paulddraper on Thursday February 01, 2018 @12:05PM (#16283486)
(1) It's three: gulb, typescript, and babel.

(2) It's hundreds more

    $ npm install
    $ jq '.dependencies | length' < package-lock.json
    176
IDK what "blind mashing" would be if not this.
Re:Announcing TypeScript 2.7 by Raphmedia on Thursday February 01, 2018 @01:20PM (#16284253)
Do you count the number of vendor DLLs when you develop .NET applications using third party libraries? Of course libraries will have dependencies.

You are only "blindy mashing" three libraries here. Gulp to manage your workflows, Typescript (because that's the goal of your workflow) and Babel to allow older browsers to read modern Javascript. You can cut Babel out of it if you develop something for a modern browser (internal apps, mostly).

That's three widely used dependencies. There is nothing obscure about them at all. The only questionable choice in that tooling chain is Gulp. The reason I used gulp here is that it's very easy to use it to output simple Typescript. Something such as Webpack and Browserify would be for bundling modules and that's an advanced topic.

Re:Announcing TypeScript 2.7 by ComputerGuru on Wednesday January 31, 2018 @04:49PM (#16277850)
Right, I forgot to mention the duplication of build systems between TypeScript’s own, webpack, npm, gulp, and others.

Ironic that you speak of "blindly mashing things together" - how many different build systems did you mash together there, hidden behind a meta npm package?

The web needs CMake or meson more than C/C++ ever did.

Re:Announcing TypeScript 2.7 by Raphmedia on Thursday February 01, 2018 @09:57AM (#16282226)
Don't be act like an idiot simply to make a point. You simply come across as some elitist programmer who can't be bothered to learn frontend tooling.

All of those technologies are simply Javascript running serverside (or developer clientside during the development).

I sent you a gulp example because gulp it's very easy to use and you can quickly build customized build processes with it.

"gulp-typescript-babel" is simply a wrapper for "gulp-babel" and "gulp-typescript" which are both simply Javascript libraries. Read their source, there's nothing complicated going on in there.

"gulp-typescript" simply wraps around "Microsoft/TypeScript" and make it easy to pipe into gulp.

"gulp-babel" simply wraps around babeljs and make it easy to pipe into gulp.

"babel" is simply a lib that polyfills and rewrite your next generation JavaScript into code that older browsers can understand.

You originally said "then you spend a month figuring out amd vs esnext vs systemjs and Babel vs browserify vs requireJS vs webpack vs god knows what else.". I sent you this snippet to show how simply it is to build TypeScript.

Oh look, I explained to you a "month worth of research" in a simple HN comment... ! You could have googled it and read a blogpost about it instead.

Sorry for being harsh but if you need a month to figure out how to run Javascript on your computer you need to consider a new career.

Re:Announcing TypeScript 2.7 by dang on Friday February 02, 2018 @03:19AM (#16289202)
You've crossed into incivility in this thread. We ban accounts that do that, so please read https://news.ycombinator.com/newsguidelines.html and use the site as intended—i.e. posting civilly and substantively, or not at all—regardless of how annoying another comment might be. We all get bitten by the annoyance bug sometimes.
Re:Announcing TypeScript 2.7 by Raphmedia on Friday February 02, 2018 @09:45AM (#16290803)
I apologize (that goes for both you and mainly for ComputerGuru), this was not my purpose here. Please do delete this comment thread as it clearly goes against what HN stands for. Negativity isn't one of my values and I'm sorry for it. As you said, the annoyance bug bit me hard.
Re:Announcing TypeScript 2.7 by dang on Friday February 02, 2018 @02:53PM (#16293687)
Thanks! It's really only a problem if it's a repeated pattern. It happens to me too, and most others.
Re:Announcing TypeScript 2.7 by Raphmedia on Thursday February 15, 2018 @11:33AM (#16385312)
Thank you for that intervention, it snapped me out of a negativity circle.