Skip to content

Instantly share code, notes, and snippets.

@torounit
Created April 14, 2014 14:25
Show Gist options
  • Save torounit/10652847 to your computer and use it in GitHub Desktop.
Save torounit/10652847 to your computer and use it in GitHub Desktop.
bower_concatを使う。bowerでインストールしたjsをassets/js/lib.jsにまとめる。
module.exports = (grunt) ->
pkg = grunt.file.readJSON("package.json")
#
# taskをロード
#
for taskName of pkg.devDependencies
grunt.loadNpmTasks taskName if taskName.substring(0, 6) is "grunt-"
#
# Gruntの設定
#
grunt.initConfig
#
# bowerでインストールしたものを、lib.jsにまとめる。
# jQueryとmodernizrはCDNから呼ぶことが多いので、除去。
#
bower_concat:
all:
dest: 'assets/js/lib.js'
exclude: [
'jquery',
'modernizr'
]
bowerOptions:
relative: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment