Skip to content

Instantly share code, notes, and snippets.

@brenopolanski
Created June 3, 2014 16:36
Show Gist options
  • Save brenopolanski/359f04bbc296a127dfd8 to your computer and use it in GitHub Desktop.
Save brenopolanski/359f04bbc296a127dfd8 to your computer and use it in GitHub Desktop.
{
"bitwise": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"newcap": true,
"esnext": true,
"latedef": true,
"noarg": true,
"node": true,
"undef": true,
"browser": true,
"trailing": true,
"jquery": true,
"curly": true,
"trailing": true,
"smarttabs": true
}
{
"watch": {
"options": {
"livereload": true
},
"css": {
"files": "sass/{,*/}*.{scss,sass}",
"tasks": "compass"
},
"js": {
"files": "<%= jshint.all %>",
"tasks": ["jshint", "uglify"]
},
"html": {
"files": [ "/*.{html,htm,shtml,shtm,xhtml,php,jsp,asp,aspx,erb,ctp}" ]
}
},
"connect": {
"server": {
"options": {
"port": 9000,
"base": ".",
"hostname": "localhost",
"livereload": true,
"open": true
}
}
},
"jshint": {
"options": {
"jshintrc": ".jshintrc"
},
"all": [ "Gruntfile.js", "js/main.js" ]
},
"uglify": {
"options": {
"mangle": false
},
"dist": {
"files": {
"js/main.min.js": [
"js/main.js"
],
"js/plugins.min.js": [
"js/plugins.js"
]
}
}
},
"compass": {
"dist": {
"options": {
"force": true,
"config": "config.rb"
}
}
}
}
module.exports = function(grunt) {
"use strict"
// Carrega os plugins relacionados no package.json
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);
// Registra a tarefa padrão
grunt.registerTask("default", ["connect", "watch"]);
grunt.registerTask("build", ["compass", "jshint", "uglify"]);
};
{
"name": "nomeProjeto",
"version": "1.0.0",
"title": "Título do Projeto",
"homepage": "http://www.sitedoprojeto.com",
"description": "Descrição do Projeto aqui",
"author": {
"name": "Autor",
"url": "http://www.site.com",
"email": "email@dominio.com.br"
},
"repository": {
"type": "git",
"url": "git://github.com/usuario/repositorio.git"
},
"devDependencies": {
"grunt": "~0.4.1",
"load-grunt-tasks": "~0.1.0",
"grunt-contrib-watch": "~0.4.3",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-uglify": "~0.2.1",
"grunt-contrib-compass": "~0.2.0",
"grunt-contrib-jshint": "~0.5.4"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment