Created
June 6, 2014 17:15
-
-
Save dancasttro/475674380d0bfa13286e to your computer and use it in GitHub Desktop.
Config Grunt
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
{ | |
"watch": { | |
"options": { | |
"livereload": true | |
}, | |
"css": { | |
"files": "app/styles/**/*.styl", | |
"tasks": ["stylus"] | |
}, | |
"js": { | |
"files": "<%= jshint.all %>", | |
"tasks": ["jshint", "uglify"] | |
}, | |
"html": { | |
"files": [ "/*.{html,htm,shtml,shtm,xhtml,php,jsp,asp,aspx,erb,ctp}" ] | |
} | |
}, | |
"browserSync": { | |
"dev": { | |
"bsFiles": { | |
"src" : "public/css/*.css" | |
}, | |
"options": { | |
"watchTask": true, | |
"server": { | |
"baseDir": "./", | |
"index": "index.html" | |
} | |
} | |
} | |
}, | |
"jshint": { | |
"options": { | |
"jshintrc": ".jshintrc" | |
}, | |
"all": [ "Gruntfile.js", "public/js/main.js" ] | |
}, | |
"uglify": { | |
"options": { | |
"mangle": false | |
}, | |
"build": { | |
"files": { | |
"js/main.min.js": [ | |
"js/main.js" | |
] | |
} | |
} | |
}, | |
"stylus": { | |
"options": { | |
"compress": false | |
}, | |
"files": { | |
"src": "app/styles/style.styl", | |
"dest": "public/styles/style.css" | |
} | |
} | |
} |
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) { | |
'use strict'; | |
// Carrega os plugins relacionados no package.json | |
//require('time-grunt')(grunt); | |
require('load-grunt-tasks')(grunt); | |
// Utilizamos o método grunt.file para fazer o parse do grunt-config.json | |
var gruntConfig = grunt.file.readJSON('./grunt-config.json'); | |
grunt.initConfig(gruntConfig); | |
//Build Projetc | |
grunt.registerTask('build', ['stylus']); | |
// Registra a tarefa padrão | |
grunt.registerTask('default', ['stylus', 'browserSync', 'watch']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment