How to use latest Ionic 2 version?


#1

Is there a way to use the latest version of the Ionic Framework? The one directly from the v2 branch on Github?

If I update package.json and do npm install I can get up to Beta 3, but there’s some changes that I need that I can’t wait until they’re bundled on Beta 4 and packaged.


#2

I think you should follow this link


#3

My question is more like if there’s something I can change in package.json to point to the v2 branch on Github, or if I should just download the code and paste it into node_modules/ionic-angular


#4

The instructions in this post might help you (they are for the alpha, but it should be the same for the beta too):

EDIT: Something I forgot to mention - a word of caution when using symlinks (for TS-projects, but I guess that it might be valid for JS-projects too), at least until Ionic moves away from Webpack:


#5

Thanks @iignatov you pointed me in the right direction, although I’m not 100% there yet.

I ended up changing one line in config.xml from:

"ionic-angular": "2.0.0-beta.3",

to:

"ionic-angular": "driftyco/ionic#2.0",

This downloads the latest version, but it does so under node_modules/ionic2 instead of node_modules/ionic-angular.

I changed the directory name manually but then I started getting errors on ionic serve. Seems it downloads a different structure tree. I may just have to can this idea. (I’m not too well versed with npm packages)


#6

Well, I never tried this myself, so I can only guess: the problem might be that Ionic releases come already pre-compiled to JS, while when downloading directly the latest (source) code, you’ll need an additional build step.


#7

We also have some steps (a bit hidden) here:

https://github.com/driftyco/ionic/blob/2.0/scripts/README.md#developing-against-ionic-locally

This requires you to download the ionic repo and be on the 2.0 branch for the first three steps, then be in your project directory for the last two.


#8

Thank you for linking to that comment! I updated it to point to the latest instructions. :smile:


#9

@brandyshea thank you! That totally did it!


#10

@brandyshea, I’m glad I could help. :slight_smile: