Closed Emerson closed 10 years ago
@Emerson sure, it can also be packed as an ember-cli addon too
Great, maybe to start I'll try getting things up and running on a broccoli branch.
@Emerson Before you do so, please track https://github.com/ember-addons/ember-components project as I'm planning to push it today or tomorrow, it is already using Broccoli and I'd like to use the same approach.
Started to make some progress on this, although there is a ton of cleanup to do.
https://github.com/Emerson/ember-forms/tree/broccoli
I'm now using broccoli to serve the docs and I've moved the CoffeeScript over to plain old JS. I'm pretty new to ES6, so I'm not really sure the best way of handling this. In my mind the library should export an AMD version and a global version, allowing users to choose whichever version they are comfortable with.
I'll continue to report my progress as I move forward.
You should use https://github.com/rpflorence/broccoli-dist-es6-module to support all flavors,
You can try to figure out how to use it or as I said wait for https://github.com/ember-addons/ember-components commit (i'll do the initial commit today)
@ember-addons Look at https://github.com/indexiatech/ember-components/blob/master/Brocfile.js :)
Awesome, this brings me great happiness! That dist-es6-module is pretty nifty - enjoying how super clean that Brocfile.js is as well... I'll adjust my work accordingly.
Update - things are going very well. Have a much better understanding of brocolli and why it kicks ass. So sweet that we can have amd, cjs, and global from a single codebase.
hey @asaf - Having trouble getting the handlebar templates parsed? I've looked at the official broccoli example app as well as your ember component work...
I feel like I'm doing the exact same thing that you guys are doing:
var app = 'lib';
function preprocess (tree) {
tree = filterTemplates(tree, {
extensions: ['hbs', 'handlebars'],
compileFunction: 'Ember.Handlebars.compile'
});
return tree;
}
app = preprocess(app);
var appModule = makeModule(app, {
global: 'Ember.Forms',
packageName: 'ember-forms',
main: 'main',
shim: {
'ember': 'Ember'
}
});
But my templates are not showing up in the compiled JS?
Any thoughts?
Nevermind, I think I figured it out. Fields are now being rendered.
Sorry I wasn't around, Ok cool, let me know if you need extra help, thanks!
On Sun, Jul 27, 2014 at 6:28 PM, Emerson Lackey notifications@github.com wrote:
Nevermind, I think I figured it out. Fields are now being rendered.
— Reply to this email directly or view it on GitHub https://github.com/indexiatech/ember-forms/issues/30#issuecomment-50267347 .
@Emerson Hey there, any news about this? do you need any help? btw don't deal with the 'docs' section, it will make the Broccoli meta file too complex, I'll diverge the samples fro this repo.
Hey @asaf
We are super close. The library is now fully ES6'ified and appears to be working well. I did have a couple of questions for you:
Brocfile.js
into smaller files distinct for each task (building tests, building docs, building plugin). What did you have in mind for this?/dist
directory? It contains the built plugin(s), so I'm inclined to say yes, but wanted to double check with you.I still need to get the tests running. I'm expecting to do that tonight - hoping it's fairly straightforward. Feel free to check in on the progress by visiting my branch: https://github.com/Emerson/ember-forms/tree/broccoli
Maybe it's time to merge things into a branch so we can both hack on things?
@Emerson Hey I wrote you, leave the docs for now if it's too complicated, it's more samples than documentation, we can find another place to host it.
Yes, /dist
is the actual distributed folder, it's the output of the build process.
Update - all tests are passing :-)
Great, what's left?
On Wed, Jul 30, 2014 at 9:16 AM, Emerson Lackey notifications@github.com wrote:
Update - all tests are passing :-)
— Reply to this email directly or view it on GitHub https://github.com/indexiatech/ember-forms/issues/30#issuecomment-50577515 .
Just the docs and perhaps some cleanup. The JS is just the compiled coffee, so it's possible we may want to adjust some syntax.
I think the best course of action is for you to create a broccoli
branch. Once the branch is created I'll do a PR and we can at least get things into official repo.
This will give us a chance to both go through and make sure there are no glaring issues - although the tests are all green, and I'm now using the compiled broccoli branch in my project without any issues.
Let me know and I'll send the PR. Thanks, very excited!
Great work guys. The work being done here will definitely be helpful to me on my project as I'm using ember-forms and ember-cli. Thank you!
Yea, we'll then have the same solution as with the ember-components project: https://github.com/indexiatech/ember-cli-components
but for forms.
@Emerson I'm willing to help if there's anything left to do =)
@Emerson Hey you, how's it going? is this PR should work ? can I review & merge it? or it needs more work?
10x
Yeah it's ready and you can start reviewing the code. I've been using the broccoli built version in my app for the last month without any issues. Happy to make any adjustments you want :-)
I was wondering if this project would be open to migrating to Broccoli, ES6 Modules, and plain old Javascript?
The reason I think this should be considered is to be more inline with the Ember community and the core developers.
I'd be interested in helping this migration process, but don't want to start unless there is a desire to do so. Let me know!