Created
September 8, 2014 22:15
-
-
Save davidortinau/e47d88cf7f1264908e98 to your computer and use it in GitHub Desktop.
imperial grunt and 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
require 'toolkit' | |
require 'compass/import-once/activate' | |
# Require any additional compass plugins here. | |
require 'breakpoint' | |
require 'breakpoint-slicer' | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "../css" | |
sass_dir = "sass" | |
images_dir = "images" | |
javascripts_dir = "javascripts" | |
# You can select your preferred output style here (can be overridden via the command line): | |
# output_style = :expanded or :nested or :compact or :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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
compass: { // Task | |
dist: { // Target | |
options: { // Target options | |
sassDir: 'source/sass', | |
cssDir: 'css', | |
environment: 'production' | |
} | |
}, | |
dev: { // Another target | |
options: { | |
sassDir: 'source/sass', | |
cssDir: 'css' | |
} | |
} | |
}, | |
concat: { | |
dist: { | |
src: ['js/vendor.js', | |
'js/app.js'], | |
dest: 'js/app.min.js' | |
} | |
}, | |
uglify: { | |
options: { | |
mangle: false | |
}, | |
my_target: { | |
files: { | |
'js/app.min.js': ['js/vendor.js','js/app.js'] | |
} | |
} | |
}, | |
watch: { | |
src: { | |
files: ['source/sass/*.scss','js/app.js','js/vendor.js'], | |
tasks: ['rebuild'] | |
} | |
} | |
}); | |
// Load the plugin | |
// grunt.loadNpmTasks("grunt-ts"); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
// grunt.loadNpmTasks('grunt-contrib-coffee'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
// grunt.loadNpmTasks('grunt-contrib-copy'); | |
// grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
// Default task(s). | |
grunt.registerTask('default', ['concat', 'uglify', 'watch']); | |
grunt.registerTask('rebuild', ['concat', 'uglify']); | |
// grunt.registerTask("server", ["connect", "watch"]); | |
}; |
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": "imperial", | |
"version": "0.0.1", | |
"description": "ERROR: No README.md file found!", | |
"main": "Gruntfile.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": "", | |
"author": "David Ortinau", | |
"license": "BSD", | |
"devDependencies": { | |
"grunt-contrib-compass": "~0.7.1", | |
"grunt": "~0.4.1", | |
"grunt-contrib-watch": "~0.4.2", | |
"grunt-contrib-concat": "~0.3.0", | |
"grunt-contrib-copy": "~0.4.1", | |
"grunt-contrib-livereload": "~0.1.2", | |
"grunt-contrib-uglify": "~0.3.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment