davidruisinger / ionic-better-structure

An alternative ionic project skeleton with a cleaner structure
39 stars 12 forks source link

Can't add any libraries into index.html #5

Closed jackulti closed 8 years ago

jackulti commented 8 years ago

Hi, I have an issue:

I've just added satellizer library (https://github.com/sahat/satellizer) into index.html but when I run ionic serve, it always remove that library I added before. I ran gulp templatecache, gulp clean, gulp wiredep but they don't work. I don't know what's going on?

davidruisinger commented 8 years ago

Where in exactly in index.html are you placing the script? Everything inside those build tags won't be there after running the serve/build task:

  <!-- build:js js/lib.js -->
  <!-- bower:js -->
    EVERYTHING IN HERE GET'S FILLED AUTOMATICALLY BY GULP TASK
  <!-- endbower -->
  <!-- endbuild -->

Best would be to just install satellizer via bower bower install satellizer. After installing via bower the script should be added automatically.

jackulti commented 8 years ago

I installed but the script for satellizer not added to index.html, am I missing something?

davidruisinger commented 8 years ago

Sorry, totally forgot to mention that you need to add the dependency to your bower.json in order to get it automatically into your index.html file. YOu can use the --save flag to do that while installing. So in your case try: bower install satellizer --save

(I added a note in the readme)