Tip: Using Ionic - without Ionic

This post is more than 2 years old.

Pardon the cryptic title. Earlier this morning I was working on a demo (the result of which is documented here) that I knew was going to be rather simple. Therefore I decided to skip using Ionic since AngularJS would have been overkill for what I was producing. I was ok with that, but what I really didn't like was losing live reload and logging in my terminal. Turns out there is a rather obvious way to get that.

When you create an Ionic application, you have the option of specifying a folder to use for your source directory. So all I did was simply use my default Cordova assets (not the CLI's default with the robot, my default) as the source. As I said, this is probably obvious, but the Ionic CLI had no issues sourcing a project with assets that did not make use of the Ionic framework itself.

I then simply ran ionic emulate ios -l -c to get live reload and console logging in Terminal and went along my merry way. I'm not getting the full benefits of the uber cool Ionic Framework with all its bells and whistles, but I did get the cool benefits at the command line and that worked well enough for me.

The only real side effect of this that I can see is that I get plugins I may not need and a after_prepare hook that does nothing. I could easily clean this up if I wanted to but for my proof of concept demo I didn't need to.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Enrico Deleo posted on 11/11/2014 at 5:57 AM

Simple yet precious tip, I didn't realised it too.
I had the same need and i came to a solution I'd like to share it 'cause I found it useful as well: I used https://github.com/fingerpr... (and the grunt task the same author released since I usually like automating stuffs) in conjunction with pidcat (brew install pidcat on OSX) and of course weinre :)

Comment 2 by Raymond Camden posted on 11/11/2014 at 7:55 PM

Cool - thanks for sharing that!