Last active
December 3, 2018 12:39
-
-
Save micahgodbolt/6402142 to your computer and use it in GitHub Desktop.
Quick grunt setup with compass compile and live reload
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) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
compass: { // Task | |
dist: { // Target | |
options: { // Target options | |
environment: 'production', | |
config: 'config.rb' | |
} | |
} | |
}, | |
watch: { | |
options: { livereload: true }, | |
sass: { | |
files: ['sass/**/*.scss'], | |
tasks: ['compass'], | |
}, | |
html: { | |
files: ['**/*.html'], | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.registerTask('default', ['compass', '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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link rel="stylesheet" type="text/css" href="css/screen.css"> | |
<script src="http://localhost:35729/livereload.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
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": "angular", | |
"version": "0.0.0", | |
"description": "test project", | |
"main": "index.js", | |
"dependencies": { | |
"grunt": "~0.4.1", | |
"grunt-cli": "~0.1.9", | |
"grunt-contrib-watch": "~0.5.3" | |
}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "BSD-2-Clause", | |
"devDependencies": { | |
"grunt-contrib-sass": "~0.5.0", | |
"grunt-contrib-compass": "~0.5.0", | |
"grunt-contrib-watch": "~0.5.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment