Created
October 14, 2013 00:01
-
-
Save AgtLucas/6968735 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
Show hidden characters
{ | |
"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 | |
} |
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
# 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 = :expanded or :nested or :compact or :compressed | |
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 |
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
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'jekyll' | |
gem 'compass' |
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
"use strict"; | |
module.exports = function(grunt) { | |
// Load all grunt tasks | |
require('load-grunt-tasks')(grunt); | |
var appConfig = { | |
// Dirs | |
dirs: { | |
js: "assets/js" | |
}, | |
// Metadata | |
pkg: grunt.file.readJSON("package.json"), | |
banner: | |
"\n" + | |
"/*\n" + | |
" * -------------------------------------------------------\n" + | |
" * Projeto: <%= pkg.title %>\n" + | |
" * Versão: <%= pkg.version %>\n" + | |
" *\n" + | |
" * Autor: <%= pkg.author.name %>\n" + | |
" * Site: <%= pkg.author.url %>\n" + | |
" * Contato: <%= pkg.author.email %>\n" + | |
" *\n" + | |
" *\n" + | |
" * Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %>\n" + | |
" * -------------------------------------------------------\n" + | |
" */\n" + | |
"\n", | |
// Watch Task | |
watch: { | |
js: { | |
files: ["<%= jshint.all %>"], | |
tasks: ["jshint", "uglify"] | |
} | |
}, | |
// Linting | |
jshint: { | |
options: { | |
jshintrc: ".jshintrc" | |
}, | |
all: [ | |
"Gruntfile.js", | |
"<%= dirs.js %>/main.js" | |
] | |
}, | |
// Minify | |
uglify: { | |
options: { | |
mangle: false, | |
banner: "<%= banner %>" | |
}, | |
dist: { | |
files: { | |
"<%= dirs.js %>/app.min.js": [ "<%= dirs.js %>/main.js" ], | |
"<%= dirs.js %>/legacy.min.js": [ "<%= dirs.js %>/legacy/*" ] | |
} | |
} | |
} | |
}; | |
// Init Config | |
grunt.initConfig(appConfig); | |
// Register tasks | |
// -------------------------- | |
grunt.registerTask( "default", [ "jshint", "uglify", "watch" ]); | |
grunt.registerTask( "build", [ "jshint", "uglify" ]); | |
}; |
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
{ | |
"name": "vitorbritto", | |
"version": "1.0.0", | |
"title": "Vitor Britto", | |
"homepage": "http://www.vitorbritto.com/blog", | |
"description": "Desenvolvedor Web", | |
"author": { | |
"name": "Vitor Britto", | |
"url": "http://www.vitorbritto.com", | |
"email": "code[at]vitorbritto.com.br" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git://github.com/vitorbritto/blog.git" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-watch": "~0.4.3", | |
"grunt-contrib-uglify": "~0.2.1", | |
"grunt-contrib-jshint": "~0.5.4", | |
"load-grunt-tasks": "~0.1.0" | |
} | |
} |
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
# Rakefile | |
# Author: Vitor Britto | |
# Version: 1.0.0 | |
# Made with Ruby, Coffee and Love. :) | |
task default: [:watch] | |
task :build do | |
build_sass | |
build_javascript | |
build_jekyll | |
end | |
task :watch do | |
build_sass | |
pids = [ | |
spawn("grunt watch"), | |
spawn("compass watch"), | |
spawn("jekyll server --watch") | |
] | |
trap "INT" do | |
Process.kill "INT", *pids | |
exit 1 | |
end | |
pids.each do |pid| | |
Process.wait pid | |
end | |
end | |
def build_sass | |
system("compass compile") | |
end | |
def build_javascript | |
system("grunt build") | |
end | |
def build_jekyll | |
system("jekyll build") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment