Download Ionic 2 bundle files without npm

Hi !

I want to try Ionic 2 without npm (I’m using Visual Studio 2015, not Ionic command line), but I don’t find where to get it.

I just want files like I can get for V1 (so ionic.bundle.js, ionic.css, ionic fonts… But for V2), like this link:

http://code.ionicframework.com/1.2.1/ionic-v1.2.1.zip

Can you help me please ?

Facing the same problem. Looking for ionic library separately, which can easily include any project even for a mobile browser based application too.

Bump, anyone ?

Seems like I’m not alone on this problem.

Its more than the libraries, the ionic commands use webpack to assemble and serve the projects. So while trying to run it without npm may seem like a clever idea, at this point it is not.

I am sure once visual studio updates to support Ionic 2 you will be fine without nodejs as a dependency. But if you want to play with Ionic2 before that you are likely going to need to install the nodejs tools including npm.

HTH
sim

Visual Studio uses node.js in the background.
I need VS 2015 to test on Ripple for iOS. It’s on the project specifications, I can’t change.

What I just need is to link Ionic 2 .js library and .scss files.

That was possible with V1, on the link I mentioned above.

Visual Studio has hooks into NPM, so you can download all neccessary packages via NPM. You can grab the Ionic 2 master off of Github but I’d strongly suggest the NPM approach for a number of reasons.

Note also: Visual Studio does not currently support type annoations/decorators so Visual Studio will throw errors on most of your code. Currently Visual Studio is not a viable option for development with Angular 2 projects. You can still use the IDE but you won’t be able to use the built in build process, and you’ll have to ignore the errors that pop up.

Thank for your answers.

I forecast to use Ionic 2 in 2016 with VS 2015, indeed. I’ll have to migrate my 2 years project from Ionic 1 to 2.

But my question still alive.
So, I created a Ionic 2 project with npm. I guess lib file is “app.bundle.js”, css files are “app.ios.css” + “app.md.css”, and all .ttf files right ? Do I need other files from Ionic 2 ?

I conclude this from here basic “cutePuppyPics” project:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Ionic</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">

  <link ios-href="build/css/app.ios.css" rel="stylesheet">
  <link md-href="build/css/app.md.css" rel="stylesheet">
</head>
<body>

  <!-- this Ionic's root component and where the app will load -->
  <ion-app></ion-app>

  <script src="cordova.js"></script>
  <script src="build/js/app.bundle.js"></script>
</body>
</html>

App.bundle.js is the full application bundle. Since you are wanting just the ionic source you should probably grab it from github or through npm using ionic-framework@2.0.0-alpha.45 or a similar version.

Yep I need exactly the same as on Ionic 1 on this link. On their github here, do you know what is the branch where they stock the bundle ? Like a /dist folder, or something.

Thank you for your help.

So it’s a bit of a different story than v1.
With V1, you were just referencing ES5 javascript, not transpiling from es6 or typescript like we’re doing in V2.
Plus the additions of modules make things a bit more difficult.

So with v2, it’s a bit more difficult to provide a single bundle file. Currently you will need to use npm to download V2 and then webpack (which we’ve setup for you) to build ionic 2 apps.

Oh ok, I see. Thank you for your explanations.

You say “Currently”, so will a bundle be available in future ?

it’s still up in the air. We’re still investigating if this would be something we would want to support or not.

It’d be an awesome feature for a lot of people I think so.

Thank you !

Hi Mhartington,
Thanks for the response. I have few queries.

  1. If i add a webpack watch then even for a small change the entire ionic and the dependent libraries need to be build again.
  2. Development time if we want to debug the code its quite difficult to do, As you know that the bundle file have more than 60 thousand lines of code.
  3. I know webpack provide a provision for creating a develop tool option which will help us to debug. But if we play around with ts then again feel difficult.
  4. Is any provision for keeping ionic and its related libraries a separate bundle and the functionality related to the app keep as a separate bundle.
  5. Even the same way the HTML (templates) and the related css files.
  6. Plz keep a option for using css instead of scss.

Thanks

Hello !

First, congratulation about Ionic 2 Beta coming out.

I post again here because about two months ago, you said you are investigating on a Ionic 2 bundle. Any news about it ?

1 Like

Little bump :slightly_smiling:

Bump. Any news about this ?