-
-
Save AVVS/8741276 to your computer and use it in GitHub Desktop.
This file contains 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 characters
module.exports = function (grunt) { | |
var files = [ | |
"bower_components/jquery/jquery.js", | |
"bower_components/lodash/dist/lodash.js", | |
"bower_components/angular/angular.js", | |
"bower_components/angular-touch/angular-touch.js", | |
"bower_components/angular-ui-router/release/angular-ui-router.js", | |
"bower_components/angular-mocks/angular-mocks.js", | |
"bower_components/angular-gestures/gestures.js", | |
"bower_components/angular-bootstrap/ui-bootstrap-tpls.js", | |
"bower_components/angular-carousel/dist/angular-mobile.js", | |
"bower_components/angular-carousel/dist/angular-carousel.min.js", | |
"bower_components/hammerjs/dist/hammer.min.js", | |
"bower_components/hammerjs/dist/jquery.hammer.min.js", | |
"js/app.js", | |
"js/server.js", | |
"js/config.js", | |
"js/directives/list/ng-infinite-scroll.min.js", | |
"js/**/*.js" | |
]; | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
cssmin: { | |
compress: { | |
options: { | |
keepSpecialComments: "0" | |
}, | |
files: { | |
"static/css/app.css": [ | |
"tmp/app.css", | |
"bower_components/angular-carousel/dist/angular-carousel.min.css", | |
"bower_components/font-awesome/css/font-awesome.min.css" | |
] | |
} | |
} | |
}, | |
less: { | |
app: { | |
files: { | |
"tmp/app.css": [ | |
"bower_components/bootstrap/less/bootstrap.less", | |
"css/application.less" | |
] | |
} | |
} | |
}, | |
concat: { | |
develop: { | |
files: { | |
"static/js/app.js": files | |
} | |
} | |
}, | |
uglify: { | |
release: { | |
options: { | |
preserveComments: false, | |
wrap: false | |
}, | |
files: { | |
"static/js/app.js": files | |
} | |
} | |
}, | |
clean: { | |
options: { | |
force: true | |
}, | |
ios: [ | |
"../platforms/ios/www/static", | |
"../platforms/ios/www/partials", | |
"../platforms/ios/www/bower_components", | |
"../platforms/ios/www/node_modules", | |
"../platforms/ios/www/js", | |
"../platforms/ios/www/tmp", | |
"../platforms/ios/www/package.json", | |
"../platforms/ios/www/bower.json", | |
"../platforms/ios/www/Gruntfile.js" | |
] | |
}, | |
copy: { | |
all: { | |
files: [ | |
{expand: true, cwd: "bower_components/font-awesome/fonts/", src: ['**'], dest: 'static/fonts'} | |
] | |
}, | |
ios: { | |
files: [ | |
{expand: true, src: ['./static/**'], dest: '../platforms/ios/www'}, | |
{expand: true, src: ['./partials/**'], dest: '../platforms/ios/www'} | |
] | |
} | |
}, | |
watch: { | |
ios: { | |
options: { | |
livereload: true, | |
interrupt: true | |
}, | |
files: ["./js/**", "./css/**", "./partials/**", "./index.html"], | |
tasks: ["ios"] | |
} | |
}, | |
ngTemplates: { | |
infood: { | |
src: 'partials/**.html', | |
dest: 'js/templates.js' | |
} | |
} | |
}); | |
grunt.loadNpmTasks("grunt-contrib-concat"); | |
grunt.loadNpmTasks("grunt-contrib-cssmin"); | |
grunt.loadNpmTasks("grunt-contrib-copy"); | |
grunt.loadNpmTasks("grunt-contrib-less"); | |
grunt.loadNpmTasks("grunt-contrib-clean"); | |
grunt.loadNpmTasks("grunt-contrib-uglify"); | |
grunt.loadNpmTasks("grunt-contrib-watch"); | |
grunt.loadNpmTasks('grunt-angular-templates'); | |
// Default task. | |
grunt.registerTask("default", ["less", "cssmin", "concat", "copy:all"]); | |
// Release task | |
grunt.registerTask("release", ["default", "uglify:release"]); | |
grunt.registerTask("ios", ["default", "clean:ios", "copy:ios"]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment