istanbuljs / istanbuljs.github.io

the Istanbul community website
https://istanbul.js.org
ISC License
22 stars 24 forks source link

write content for ES2015 tutorial #8

Open bcoe opened 8 years ago

bcoe commented 8 years ago

I would love help pulling together a tutorial, regarding adding test-coverage to ES6 projects using nyc, babel-plugin-istanbul, etc.

I've added this section waiting to be filled in:

http://istanbul.js.org/2016/08/02/es6.html

@insin, @graingert, @kentcdodds, don't suppose you could help pull something together.

graingert commented 8 years ago

es6 is not the correct term. You should use es2016, or maybe TC39

graingert commented 8 years ago

please please please help kill the term 'es6'

graingert commented 8 years ago

also the current documentation talks about nyc. Isn't nyc going to become npm install istanbul

bcoe commented 8 years ago

@graingert all this, and much more, could be addressed in the content proposed in this issue/corresponding pull request 👯

@graingert nyc is mostly likely going to remain a stand-alone bin in the near future.

graingert commented 8 years ago

@bcoe you're really twisting my arm here....!

graingert commented 8 years ago

what aboot https://github.com/istanbuljs/istanbuljs.github.io/pull/10/files

graingert commented 8 years ago

@bcoe also do this https://github.com/js-org/dns.js.org/pull/779

kentcdodds commented 8 years ago

es6 is not the correct term. You should use es2016, or maybe TC39

I think you mean es2015 :) es6 !== es2016. Also, TC39 doesn't make sense...

please please please help kill the term 'es6'

You can pry that term out of my cold dead fingers ;-) But I'm all good with the new naming convention after that :) (es2016, es2017, etc).

bcoe commented 8 years ago

@graingert see last comment on:

https://github.com/istanbuljs/istanbuljs.github.io/pull/10

Goal is to help folks find the documentation they're looking for, more so than using the perfect term. I know you're joking, but let's try to work together discussing tutorial comment and not get hung up on this.

bcoe commented 8 years ago

@kentcdodds @novemberborn @hzoo @gotwarlost I gave a presentation on ES2015 test coverage to npm engineering today, and pulled together a first pass at this tutorial:

http://istanbul.js.org/docs/tutorials/es2015/

Would love your feedback, and will happily pull in any edits.

bcoe commented 8 years ago

CC: @MoOx (see above)

graingert commented 8 years ago

I'd probably mention https://github.com/michaelcontento/babel-preset-modern-node along with node.green as node isn't quite 100% on ES2015.

(Although modern-node follows the latest released ES spec so it's on ES2016 now)

hzoo commented 8 years ago

If you aren't using babel-core directly (looks like it's babel-core/register) you can just use the babel-register package.

hzoo commented 8 years ago

Would be nice to include node in https://github.com/babel/babel-preset-env, we should ask all the node-x, w.e presets to help out.

This is new but you can use the latest preset instead of es2015 (https://github.com/babel/babel/releases/tag/v6.14.0). You can pass in es2015, and those options as well.

bcoe commented 8 years ago

@hzoo can we drop the babel-core dependency and just use babel-register? for some reason I thought babel-core was required for the preset. That simplifies things even more.

Would be nice to include node in https://github.com/babel/babel-preset-env, we should ask all the node-x, w.e presets to help out

That's a great idea. CC: @addaleax (thoughts on this topic?)

bcoe commented 8 years ago

@graingert great suggestion.

hzoo commented 8 years ago

Right babel-core is already a dependency in babel-cli, it's not necessary (only when using babel-loader since it's a peerDep in that case).