Created
January 9, 2014 13:59
-
-
Save leandrojo/8334491 to your computer and use it in GitHub Desktop.
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 characters
| "use strict"; | |
| module.exports = function(grunt) { | |
| // Configurando as tarefas aqui. | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| watch: { | |
| scripts: { | |
| files: ['**/*.js'], | |
| tasks: ['concat', 'express:dev'], | |
| options: { | |
| spawn: false, | |
| }, | |
| }, | |
| }, | |
| jade: { | |
| compile: { | |
| options: { | |
| data: { | |
| debug: false | |
| } | |
| }, | |
| files: { | |
| "www/index.html": "www/index.jade", | |
| "www/templates/*.html": "www/templates/*.jade", | |
| } | |
| } | |
| }, | |
| concat: { | |
| options: { | |
| separator: ';' | |
| }, | |
| dist: { | |
| src: [ | |
| 'www/js/config/router.js', | |
| 'www/js/controllers/*.js' | |
| ], | |
| dest: 'www/js/app.js' | |
| } | |
| }, | |
| express: { | |
| options: { | |
| }, | |
| dev: { | |
| options: { | |
| script: 'server.js' | |
| } | |
| }, | |
| prod: { | |
| options: { | |
| script: 'server.js', | |
| node_env: 'production' | |
| } | |
| } | |
| }, | |
| exec: { | |
| build: { | |
| command: "cordova build android", | |
| stdout: true, | |
| stderror: true | |
| }, | |
| } | |
| }); | |
| // Carregando os plugins aqui. | |
| grunt.loadNpmTasks('grunt-contrib-jade'); | |
| grunt.loadNpmTasks('grunt-contrib-concat'); | |
| grunt.loadNpmTasks('grunt-express-server'); | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| grunt.loadNpmTasks('grunt-exec'); | |
| // Registrando as tarefas customizadas aqui | |
| grunt.registerTask('dev', ['concat', 'express:dev', 'watch']); | |
| grunt.registerTask('prod', ['concat', 'express:prod']); | |
| grunt.registerTask('build', ['concat', 'jade', 'exec:build']); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment