Created
June 10, 2014 08:15
-
-
Save djforth/ab13d03e47a3466e8bea to your computer and use it in GitHub Desktop.
Revisions
-
djforth created this gist
Jun 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { libs:{ files: { "app/assets/javascripts/lib.js": ["app/assets/javascripts/libs/*.js"] }, options: { alias:[ "./bower_components/angular/angular.js:angular", "./bower_components/lodash/dist/lodash.js:lodash"], shim:{ jquery:{ path:"./bower_components/angular/angular.js", exports:"angular" }, underscore:{ path:"./bower_components/lodash/dist/lodash.js", exports:"_" }, } } }, app: { files: { 'app/assets/javascripts/app.js': ['app/assets/javascripts/app/**/*.coffee'], }, options: { transform: ['coffeeify'], alias:[ "./bower_components/angular/angular.js:angular", "./bower_components/lodash/dist/lodash.js:lodash" ], external:["./bower_components/angular/angular.js", "./bower_components/lodash/dist/lodash.js"], } }, watch: { browserify:{ files: ["app/assets/javascripts/**/**/**/*.coffee", "spec/javascripts/modules/*.coffee"], tasks: ['browserify:app'] }, } }); require('load-grunt-tasks')(grunt); // Runs both browserify tasks grunt.registerTask('default', ['browserify']); grunt.registerTask('libs', ['browserify:libs']); grunt.registerTask('dev', ['watch']); }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ { "name": "Test", "version": "0.1.0", "repository": { "type": "git", "url": "..." }, "devDependencies": { "grunt": "~0.4.2", "grunt-contrib-coffee": "~0.7.0", "grunt-contrib-watch": "~0.5.3", "load-grunt-tasks": "~0.2.1", "grunt-contrib-clean": "~0.5.0", "browserify": "~3.28.2", "grunt-browserify": "~1.3.0", "grunt-coffeeify": "~0.1.3", "through": "~2.3.4", "duplexer": "~0.1.1" }, "dependencies": { "underscore": "~1.6.0", "jquery": "~1.11.0", } }