Skip to content

Instantly share code, notes, and snippets.

@gneutzling
Created October 21, 2013 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gneutzling/7085843 to your computer and use it in GitHub Desktop.
Save gneutzling/7085843 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
}
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "assets/css"
sass_dir = "assets/sass"
images_dir = "assets/images"
javascripts_dir = "assets/js"
# You can select your preferred output style here (can be overridden via the command line):
output_style = :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
"use strict";
module.exports = function(grunt) {
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
var appConfig = {
// Dirs
dirs: {
js: "assets/js",
sass: "assets/sass",
css: "assets/css",
img: "assets/images"
},
// Metadata
pkg: grunt.file.readJSON("package.json"),
banner:
"\n" +
"/*\n" +
" * -------------------------------------------------------\n" +
" * Project: <%= pkg.title %>\n" +
" * Version: <%= pkg.version %>\n" +
" *\n" +
" * Author: <%= pkg.author.name %>\n" +
" * Website: <%= pkg.author.url %>\n" +
" * Email: <%= pkg.author.email %>\n" +
" *\n" +
" *\n" +
" * Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %>\n" +
" * -------------------------------------------------------\n" +
" */\n" +
"\n",
connect: {
server: {
options: {
port: 9000,
base: ".",
hostname: "localhost",
livereload: true,
open: true
}
}
},
// Watch Task
watch: {
options: {
livereload: true
},
css: {
files: "<%= dirs.sass %>/{,*/}*.{scss,sass}",
tasks: ["compass"]
},
js: {
files: "<%= jshint.all %>",
tasks: ["jshint", "uglify"]
},
html: {
files: "/*.html"
}
},
// Linting
jshint: {
options: {
jshintrc: ".jshintrc"
},
all: [
"Gruntfile.js",
"<%= dirs.js %>/main.js"
]
},
// Minify and concat
uglify: {
options: {
mangle: false,
banner: "<%= banner %>"
},
dist: {
files: {
"<%= dirs.js %>/main.min.js": [
"<%= dirs.js %>/main.js"
],
"<%= dirs.js %>/plugins.min.js": [
"<%= dirs.js %>/plugins.js"
]
}
}
},
// Compile Sass/Scss to CSS
compass: {
dist: {
options: {
force: true,
config: "config.rb"
}
}
}
};
// Init Config
grunt.initConfig(appConfig);
// Register tasks
// --------------------------
// Do all stuff, except for optimize images and deploy
grunt.registerTask( "default", [ "connect", "watch" ]);
};
{
"name": "nome-projeto",
"version": "0.1.0",
"title": "Título do Projeto",
"homepage": "www.projeto.com.br",
"description": "Uma descrição para o seu projeto.",
"author": {
"name": "Autor",
"url": "http://www.site.com.br",
"email": "email@dominio.com.br"
},
"repository": {
"type": "git",
"url": "git://github.com/usuario/repositorio.git"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.1",
"grunt-contrib-watch": "~0.4.3",
"grunt-contrib-compass": "~0.2.0",
"grunt-contrib-jshint": "~0.5.4",
"load-grunt-tasks": "~0.1.0",
"grunt-contrib-connect": "~0.5.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment