google / traceur-compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler
Apache License 2.0
8.17k stars 578 forks source link

Compile src to dist as commonjs modules. #2065

Closed arv closed 8 years ago

arv commented 8 years ago

Should we use dist/commonjs or maybe src/commonjs? Right now I'm using dist which is not that nice since we are all moving to an ES module world and commonjs modules will hopefully go away.

arv commented 8 years ago

@johnjbarton I can squash all these PRs into one if you prefer?

@guybedford Does this solve your issue?

arv commented 8 years ago

Another thing to consider is to require Node 5 and disable transformations that are natively supported there.

arv commented 8 years ago

One more option would be to publish these as a different npm package... but I don't like that... Do you?

arv commented 8 years ago

@johnjbarton PTAL

I changed it to compile to dist/commonjs since that leaves us more room for other output formats in the future.

johnjbarton commented 8 years ago

yes I think the dist version is better, LGTM

arv commented 8 years ago

@johnjbarton Your comment is a bit unclear to me; "dist version" as in dist/ or "dist version" as in dist/commonjs/?

johnjbarton commented 8 years ago

sorry, I meant your last change, with the sub-dir.

On Wed, Jan 27, 2016 at 8:58 AM, Erik Arvidsson notifications@github.com wrote:

@johnjbarton https://github.com/johnjbarton Your content is a bit unclear to me; "dist version" as in dist/ or "dist version" as in dist/commonjs/?

— Reply to this email directly or view it on GitHub https://github.com/google/traceur-compiler/pull/2065#issuecomment-175742640 .

arv commented 8 years ago

@johnjbarton I think I need to update the npm script version too... We should remove the make version once we resolved the current snafus.