-
Notifications
You must be signed in to change notification settings - Fork 0
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distribution plan #2
Comments
I have specific (and long) thoughts about this generally. I've been spitballing ideas with @fivetanley about ways to resolve this problem. I need to put some investigation time in this weekend before we get anyone's hopes up. I think your general repo plan is a good idea as an easy migration; although I HATE that we're polluting github with non-source code and it comes with annoying logistics overhead (you won't believe the number of PRs you'll get targeting the publish repos instead of the source repos). If we publish amd, cjs, es6, and globals, I don't think there is any value in adding a umd build. |
There's now a bower issue about some of these ideas: bower/bower#1606 |
Another thing to look into is https://github.com/6to5/6to5 |
I usually prefer https://github.com/esnext/es6-module-transpiler for a few reasons:
|
If we have a chooser on the website for all the packaging, minification and bundling options that would be epic. So you choose with some checkboxes, and then there is a grunt command to run on the distribution repo, or a zip to download (for all the ones who don't have node and don't want to bother). About distribution: I've seen projects do separate repos for particular build systems (like https://github.com/angular/bower-angular). If the system is push based (like npm, spm, nuget, meteor), then you can have a grunt/bash script that makes a directory with the right structure and publishes that. No even need to put the package.json file (for example) in the root directory. If it's autodetect, then we should have a separate repo per environment (or share a repo in between a few environments). Another thing to take into account is how easy it is for a person who have read the bundled version to figure out where stuff is in the source version and how to build one himself -- because that is what most devs would need anyway (when they hit a crazy bug we won't fix). So having many repos and scripts that do stuff gets in the way. Also I don't see why not use a single repo with a |
You might consider using StealJS's steal-tools for builds: http://stealjs.com/docs/steal-tools.html. You can set it to use either Babel or Traceur for transpiling. There's a quick start tutorial to get an idea of how it works workflow-wise: http://stealjs.com/docs/StealJS.quick-start.html If you'd like to see an example of how the builds work you can look at this project I've just started: https://github.com/marshallswain/can-stache-moment. |
In order to minimize chaos, it would be nice to have separate repos for source files and distribution files.
Unfortunately, because so many package managers use git urls as their sources, I don't think we can host distribution files on another repo like
component/moment
.I think the best plan would be to create something like a
moment/moment-source
repo that all development is done on, and the only commits on themoment/moment
repo would be compiled builds.Anything specific to distribution would live in
moment/moment
, and anything related to development would be inmoment/moment-source
.For the compiled builds, we will probably want to target es6, globals, amd, commonjs, and umd. The file tree might look something like this.
For all these environments we will probably need to decide whether to bundle the source into a single file or not.
We will also need to figure out if we want to have a version with the locales bundled, a version without the locales bundled, or both.
We should also consider if we want to provide a minified copy of each version.
The text was updated successfully, but these errors were encountered: