Closed amiller-gh closed 9 years ago
@matthewrobb @jmeas, anything to add?
Is there any reason you don't wish to output UMD? 6to5 supports that out-of-the-box. ref
I have a first pass at this ready to commit once https://github.com/epicmiller/rebound/pull/36 gets pulled in.
@matthewrobb I've pulled both the computed properties update and my first pass at Gulp into master. rebound.compiler.js
and rebound.compiler.min.js
aren't being generated yet because they will be the by-products of your work on https://github.com/epicmiller/rebound/issues/28. I'll leave this open until they are. I think you'll find working with htmlbars and the build much nicer now :)
@jmeas I figured since we are able to generate both amd
and cjs
it wouldn't make much sense to generate umd
as well. It has a slightly larger wrapper to accommodate both languages (extra bits to push down the pipe) and so with generated module code it seems better to just use the language we need. To me umd
makes more sense for hand-written modules that need to work with both out of the box.
@epicmiller Currently the demo doesn't compile correctly out of the box due to a missing templates subdir. Perhaps add a .gitkeep
file in there to ensure it exists or add something to the recompile-demo task?
With the move to 6to5 are there any ES6 features you are okay with being used and if so are there any you would prefer NOT be used?
Sorry about it not working out of the box, didn't remember to make sure the templates dir was created on first run. Heres a PR to fix the out-of-the-box bugs: https://github.com/epicmiller/rebound/pull/38
Things like Enhanced Object Literals I'm apprehensive about because support partially depends on the browser, I don't want to have to include the 6to5 polyfills for the sake of size, and subclassing Array
, Date
and Element
this early on scares me (although it may be cool to have our component objects subclass Element and literally be an instance of the custom element, I need to look into how they are doing it)
But any other features that don't require anything from the browser or the polyfill will be okay with me until we find out they kill performance for one reason or another:
options || (options = {})
s over asap)I may ask that we take a look at the generated code the first few times we use these to make sure 6to5 isn't doing anything stupid.
Do you have any preferences / opinions?
The other option though is to forgo all of them except module transpiling so we have intimate control over the size of Rebound. Arguments can be made for each.
@epicmiller Perhaps we should turn on only those things that do not require a runtime in the options to 6to5? I am already using template strings in some stuff I am working on. My opinion is that we embrace as much of the low hanging fruit as possible.
I completly agree, best to start early. It will also give me a great excuse to really learn the new conventions :+1:
If you have a few minutes feel free to throw up a PR for that, I need to run to a meeting unfortunately
Check out PR https://github.com/epicmiller/rebound/pull/39 for this
This has been resolved for a while now. A different issue is now open for rebound.compiler.js
Lets kick Grunt to the curb and start using a build tool thats not painful!
AMD Files Here
CJS Files Here
rebound.runtime.js
rebound.runtime.min.js
rebound.compiler.js
rebound.compiler.min.js
Rebound runtime does not include the HTMLBars compiler, Rebound compiler or definitions for the custom
<rebound-element>
. It assumes pre-compiled templates from the server.There is no
rebound.runtime.prod.js
because every concatted file now uses Almond.