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.
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.
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.
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.
Hi Mhartington,
Thanks for the response. I have few queries.
If i add a webpack watch then even for a small change the entire ionic and the dependent libraries need to be build again.
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.
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.
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.
Even the same way the HTML (templates) and the related css files.