Coder Social home page Coder Social logo

Comments (13)

joefiorini avatar joefiorini commented on July 17, 2024

How would one customize build options if needed? It seems like that might be difficult, would it better to break up ember-app-kit into NPM modules of grunt asks preconfigured for Ember defaults?

from ember-app-kit.

joefiorini avatar joefiorini commented on July 17, 2024

I've been thinking about this a bit as I have a library where I need to do something similar to EAK (also see my proposal for option 2 below for a better description of the problem). I've come up with a couple options here:

1. Grunt Wrapper

This is the approach that Lineman takes. It provides its own executable (lineman) and delegates commands to grunt. Lineman configures itself within the NPM module. To set any explicit configuration, you have to do it in config/application.js. The problem is, I know grunt and have configurations for most of the tasks that Lineman uses. I'd rather just override task options in a Gruntfile and be done.

2. Built-In

This is a larger proposal that involves creating a new task to load options from NPM modules (essentially extracting @stefanpenner's loadConfig function), but would allow a user to include EAK as an NPM module and then override settings in their own Gruntfile. Ideally I'd like to take this idea to the Grunt team and try to make these methods on grunt itself, but want to get some feedback on the general idea first. See the gist of the proposal.

3. Another Option

One other option I see is to create our tasks that wrap the tasks we're including, and supply custom configuration for them. For example, EAK's grunt build task could be configured with a handlebars_template_paths option specifically for overriding the default template lookup. This would put control of customizability into the hands of the module-author, not the user, which may or may not be ideal. I think I'd prefer to just override the tasks' options myself, in case, for eg. I want to change the Sass output syntax.

Thoughts?

from ember-app-kit.

ryanflorence avatar ryanflorence commented on July 17, 2024

well .. it is a git repo with an upstream, so we could just take care to say "these are parts of the kit, avoid them to avoid merge conflicts".

One of the issues of ember-tools is that it isn't standalone so you are tied to my release schedule which is terrible. I do not want to see ember app kit have the same problem by hiding all the tooling behind an npm module.

from ember-app-kit.

stefanpenner avatar stefanpenner commented on July 17, 2024

I think this is worth keeping on our mind, but seems tough without massive compromises. At least today.

from ember-app-kit.

joefiorini avatar joefiorini commented on July 17, 2024

Me either, I've currently been using the upstream method to keep it
up-to-date. It's only slightly painful since there are somethings we've
had to customize (eg. using grunt-connect-proxy to run our rack-based
fake API through grunt).

On Thu, Sep 5, 2013 at 10:11 PM, Ryan Florence [email protected]:

well .. it is a git repo with an upstream, so we could just take care
to say "these are parts of the kit, avoid them to avoid merge conflicts".

One of the issues of ember-tools is that it isn't standalone so you are
tied to my release schedule which is terrible. I do not want to see ember
app kit have the same problem by hiding all the tooling behind an npm
module.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-23914809
.

from ember-app-kit.

thomasboyt avatar thomasboyt commented on July 17, 2024

agree on not hiding anything. visible boilerplate > hidden tasks; learned that from grunt-microlib.

i think upstream strategy is good for now, maybe could add a bit to docs about it. ember create executable could do something like yeoman, where it prompts whether you want to overwrite for each changed file. hell, maybe we could even have it update by using the git repo and doing some kind of merge magic? not sure.

from ember-app-kit.

joefiorini avatar joefiorini commented on July 17, 2024

Currently I'm using git checkout -p eak/master. That lets me choose
chunk-by-chunk which changes I want to apply, and I can choose to leave my
customizations as well. Takes about 10-15 minutes, but seems like the
easiest way to not lose my changes.

On Thu, Sep 5, 2013 at 10:20 PM, Thomas Boyt [email protected]:

agree on not hiding anything. visible boilerplate > hidden tasks; learned
that from grunt-microlib.

i think upstream strategy is good for now, maybe could add a bit to docs
about it. ember create executable could do something like yeoman, where
it prompts whether you want to overwrite for each changed file. hell, maybe
we could even have it update by using the git repo and doing some kind of
merge magic? not sure.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-23915068
.

from ember-app-kit.

ryanflorence avatar ryanflorence commented on July 17, 2024

when the dust settles

  • Gruntfile.js will be changing most frequently
  • tasks/ will be changing occasionally
  • package.json too
  • everything else is (should be) a bower or npm dependencies (loom generators, grunt tasks)

so maybe:

  1. we check in Gruntfile.js.sample instead of Gruntfile.js
  2. ember new clones the repo
  3. sets up the upstream branch
  4. copies Gruntfile.js.sample to Gruntfile.js

And then users should be able to git pull upstream master with minimal conflicts. Then bower install && npm install and finally decide what they want to bring in from the updated Gruntfile.js.sample.

Also, lets not forget, upgrading pretty much anything is always rough no matter how hard the vendor tries to make it seamless, so its an important goal of EAK to make upgrading easy, but its not the first priority, (maybe second). I think the best strategy is try to make EAK just the aggregate of bower and npm dependencies. Keep our footprint in the repo as small as possible.

from ember-app-kit.

gunn avatar gunn commented on July 17, 2024

@thomasboyt and @rpflorence's ideas sound good to me. I would prefer it though if I didn't have to have my commit history muddled with EAK's though.

I imagine a process like:

npm install app-kit
ember update .
    conflict  Gruntfile.js
Overwrite Gruntfile.js? (enter "h" for help) [Ynaqdh]  
git commit -am 'Updated ember app-kit to 0.2.0.'

One of the options for 'Overwrite Gruntfile.js' could be to copy to Gruntfile.js.sample.

from ember-app-kit.

joefiorini avatar joefiorini commented on July 17, 2024

@gunn You can avoid muddling the history if you add this repo as a remote (git remote add eak stefanpenner/ember-app-kit) in your codebase and use git read-tree eak/master to pull the code in. To update you can use git checkout --patch eak/master and pick from each change which you want to pull in.

from ember-app-kit.

rwjblue avatar rwjblue commented on July 17, 2024

@joefiorini - That is way better than what I was doing. Thanks!

from ember-app-kit.

gunn avatar gunn commented on July 17, 2024

@joefiorini great advice! I'll do that for now. I think the official EAK strategy could be more friendly though

from ember-app-kit.

stefanpenner avatar stefanpenner commented on July 17, 2024

closing in favor of: #256

from ember-app-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.