Where are the css and js files located?


#1

In the documentation, at http://ionicframework.com/docs/overview/#cordova, there’s the line:

To add Ionic to your Cordova, PhoneGap, or Trigger.io project, just reference the Ionic CSS and JS files from the web root of your app.

Where can I locate the Ionic CSS and JS files? I tried looking in the ionic npm package and couldn’t locate them.


#2

Is is not lib/ionic/[css,js]? It should be located here once having created a new project.


#3

Hey,

There are a few ways to download the source files.

The ionic npm package is for the Ionic CLI. You are looking for the ionic-sdk npm package: https://www.npmjs.com/package/ionic-sdk

Some other ways:

  1. You can download (or link to) the files directly from here: http://code.ionicframework.com/

  2. They are available on our github: https://github.com/driftyco/ionic
    The “Manual Start” section of the README goes through some other ways to install. The release directory has the files you are interested in: https://github.com/driftyco/ionic/tree/master/release

  3. As planetoftheapes said, you can create a new Ionic app using the ionic start command from the CLI and it will put the files you need in the lib directory, and include them for you in the main html file.

If you’d like to go with the last option, take a look at our “Getting Started” docs: http://ionicframework.com/getting-started/

Sorry for any confusion. Let me know if you have any questions!


#4

I ended up using Bower and pulling down the Bower package and running a gulp task to copy the files into www.

@planetoftheapes I had a pre-existing Cordova project so I didn’t use Ionic’s create project CLI.

@brandyshea Didn’t know about the ionic-sdk package. That looks more like I was looking for.

Just for some context, I come from a web dev background using Webpack so I’ve used NPM and CommonJS for pulling in dependencies and so I found the documentation a bit unclear.


#5

Thanks for the feedback! I created an issue on Github to improve the docs around adding Ionic to an existing project:

If you have anything in mind that would be helpful to add, we love any contributions/PRs: http://ionicframework.com/contribute/#overview