Using latest Ember.js (1.0.0-PRE.3) with yeoman - ember.js

The ember.js team just released the new version of the ember framework version 1.0.0-pre.3 this version includes the new "router" API that I'm very eager to use.
I'm about to start a new app and yeoman is in my workflow to help, but the yeoman ember-generator uses the 1.0.0-pre.2 version (wich has the deprecated router API implementation) for the generation of the projects boilerplates, but I would like to use the new version 1.0.0-pre.3 in my new project, and the easy way to do it is very hacky, it would be to change the ember.js lib directly in the yeoman templates directories and update the version number in the corresponding generator script that uses it, I've already made a test changing it this way and it would work, but this way I would "break" my yeoman installation, this is not a good option I think.
So my final master question is, how would I go about to update yeoman to use the new ember lib without hacking? Or should I maybe make a fork of the project https://github.com/yeoman/yeoman create a new branch for a new ember-generator (using the latest ember lib obviously) and make a pull request hoping to get accepted? Can someone "yeoman savvy" point me in the right direction here? I just want to make it the right way... if there is one :)
Thanks in advance!

Just manually update the ember lib in your project.
Yeoman 1.0 will have support for updating libs transparently.

Related

Angular2 basic seed in WebStorm

I am new to Angular2 and WebStorm. I am looking for a basic project seed for WebStorm that I can start play around with Angular2.
There are lots of them online, but I can't find a single one that walks me through what are the basic packages that I need and why I need them.
Is any of you aware of a tutorial that can help me accomplish this?
As you are new to Angular2, just start with Angular2 Quickstart. You can create a new empty project in WebStorm and start populating it with your stuff following the steps in tutorial, or download the project stub from https://github.com/angular/quickstart and open project folder in WebStorm using File | Open.
Note that WebStorm itself doesn't force you to use this or that project skeleton, generator, bundler, etc. - just use whatever you want... see also https://blog.jetbrains.com/webstorm/2016/04/angular-2-workflow-in-webstorm - you may find this blog post helpful

emberjs - don't include bower component in my distribution dir without giving any errors

I'm trying to use Faye in my ember project.
I have this import line in my brocfile
app.import('bower_components/faye-browser/index.js');
And the corresponding bower.json entry looks like this:
"faye-browser": "http://af2447c3.fanoutcdn.com/bayeux/static/faye-browser.js",
Just to be sure I checked and indeed I have a file named "bower_components/faye-browser/index.js".
However, no matter what I do and how I build, the content of faye-browser/index.js simple does not exist anywhere in vendor.js, nor anywhere else in the output folder (/dist).
Ember don't give me any error or explanation as to why it ignores this file. It just ignores it, and "Faye" is undefined in my ember js.
I've seen this question already: Testing Emberjs app using QUnit and Karma fails due to `ReferenceError: Faye is not defined`
but it didn't work.
I just had similar experience. In my project I depend on jQuery UI and it is imported in similar manner. I upgraded from ember-cli 0.2.7 to 1.13.1 and all of a sudden jQuery UI is not present. I haven't pinpointed the exact root cause yet but it might be related to the new ember-cli version. Need to downgrade to ember-cli 0.2.7 to see if the problem will disappear. Haven't done it yet though.
In case you use ember-cli 1.13.x you could try with previous version and see if the issue will be gone.
UPDATE:
I think I found the problem. The new ember-cli version replaces Brocfile.js with ember-cli-build.js.
Right now I have both files in my root folder and my customizations are applied in Brocfile.js (because the old version used this file) however they need to be moved to ember-cli-build.js.
You might be in the same situation and this could be the reason why applying changes to Brocfile.js doesn't change the output vendor.js file.

Writing an ember-cli addon in Coffeescript

I'm trying to author an ember-cli addon, and I prefer to develop in Coffeescript. But it seems like the CLI build is hardcoded to look for just .js files. Is there any way to author an addon in Coffeescript and have the build take place with the consuming application's build (i.e. without me having to build the addon each time using a custom build process).
Yes, you can author in Coffeescript, but there was a bug in 0.0.46 where we would only preprocess *.js files in the addon tree. This is fixed on master, and should be included in 0.0.47 soonish...
So turns out this is a bug in the CLI, but it wasn't fixed in 0.0.47. See https://github.com/stefanpenner/ember-cli/issues/2354 for more context, it's currently an open issue & PR.

How to add Ember-Bootstrap to an EmberJS project created via Yeoman

I've started working on an EmberJS application and used Yeoman to generate the skeleton structure. Now, I'd like to add Ember-Bootstrap to my project but am having trouble doing so. I downloaded the latest version from GitHub and unzipped it but I'm not sure what to include.
I see several .js files in the packages/ember-bootstrap/lib folder. Do I need to include all of these? If so, then in which order should I include them?
Someone mentioned in another answer that you needed to add it to the "assets" folder but I don't have one of these.
Does installing Ember-Bootstrap require having a Rails project? I'm not familiar with Rails so please forgive for the newbie questions.
Thanks.
I found a great project that supports Bootstrap 3.0 with many components,
you can find it here:
https://github.com/ember-addons/bootstrap-for-ember
you can see all components alive:
http://ember-addons.github.io/bootstrap-for-ember
GoodLuck.

Keeping dependency versions up to date in Leiningen projects

Is there a simple way to find out what versions of dependencies are available using Leiningen?
E.g., if I have a web app which depends on Hiccup and Compojure, how can I be sure that I'm on the latest version of each without going to the github page for each?
NOTE: I use Ant and Ivy for building my Java projects, so I have limited knowledge of Maven - so please spell out (or provide Fine Links for me to read) any Maven concepts that Leiningen exposes to me which would help with this (I know that under the hood, Leiningen uses Maven for dependency resolution). Ta.
The Clojure ecosystem has evolved since the original answer was offered. At the present time, I would recommend using lein-ancient:
A Leiningen plugin to check your project for outdated dependencies and plugins. This plugin supersedes lein-outdated and uses metadata XML files in the different Maven repositories instead of a Lucene-based search index. Version comparison is done using version-clj.
Its precursor, lein-outdated, has this helpful message in its README: "lein-outdated is outdated". :)
The canonical way of doing this, at least for dependencies kept in clojars, is the lein-search plugin.
Update: See the highest-rated answer below for a more up-to-date response.
You should have a look at the answer to this question. Leiningen uses the same versioning mechanism as maven so, for example, if you want to use the latest version of a given library, you can substitute the word "LATEST" for the version number. You can also specify a release version or a version range. Again, look at the answer at that link.
Web service that provides this info, along with badges for readmes.
http://clj-deps.herokuapp.com
Disclaimer, by me.