lucidnz / bootstrapify-1

An open-source base theme for Shopify using Twitter Bootstrap
http://bootstrapify-theme.myshopify.com/
187 stars 72 forks source link

Might want to consider the main-bower-files package #230

Open ghost opened 9 years ago

ghost commented 9 years ago

https://github.com/ck86/main-bower-files

Basically instead of the current copy task you would do the following

bower: {
  // grab js files from bower
  js: {
    options: {
      filter: '**/*.js'
    },
    dest: 'theme/assets/'
  }
}

This will copy all the "main" .js files for each bower dependency, you can also override in bower.json the main files like so (i.e. if you would rather have the minified version).

"overrides": {
  "jquery-colorbox": {
    "main": "jquery.colorbox-min.js"
  }
}

You can also just do

bower: {
  // grab all files from bower
  assets: {
    dest: 'theme/assets/'
  }
}

Then override in bower.json what files you want to pull in from the dependency folder.

"overrides": {
  "jquery-colorbox": {
    "main": "jquery.colorbox-min.js"
  },
  "bootstrap-sass-official": {
    "main": [
      "assets/javascripts/bootstrap/*.js",
      "assets/fonts/bootstrap/glyphicons-halflings-regular.eot",
      "assets/fonts/bootstrap/glyphicons-halflings-regular.svg",
      "assets/fonts/bootstrap/glyphicons-halflings-regular.ttf",
      "assets/fonts/bootstrap/glyphicons-halflings-regular.woff"
    ]
  }
}
stewartknapman commented 9 years ago

Thanks @ghost. I'll look into this.