Skip to content

Instantly share code, notes, and snippets.

@foo9
Last active December 20, 2015 05:18
Show Gist options
  • Select an option

  • Save foo9/6076739 to your computer and use it in GitHub Desktop.

Select an option

Save foo9/6076739 to your computer and use it in GitHub Desktop.
編集 → 結合 → 再読み込み
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
options:
livereload: true
files: [
'public/js/*.js'
'public/js/lib/*.js'
'public/js/lib/models.js'
'public/js/lib/collections.js'
'public/js/lib/views.js'
],
tasks: ['concat:build']
concat:
options:
stripBanners: true,
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n\n'
separator: '\n'
build:
src: [
'public/js/lib/jquery-1.10.2.min.js'
'public/js/lib/underscore-min.js'
'public/js/lib/backbone-min.js'
'public/js/global.js'
'public/js/models/*.js'
'public/js/collections/*.js'
'public/js/views/*.js'
'public/js/main.js'
],
dest: 'public/js/build/all.js'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment