Created
October 29, 2013 13:44
-
-
Save apisandipas/7214906 to your computer and use it in GitHub Desktop.
Basic SCSS compiling / JS linting Gruntfile. `grunt` or `grunt watch` for development.
`grunt build` will compress css ouput.
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'), | |
sass: { | |
dist: { | |
options: { | |
style: 'compressed' | |
}, | |
files: { | |
'./css/screen.css' : './src/scss/screen.scss' | |
} | |
}, | |
dev : { | |
options: { | |
style: 'nested' | |
}, | |
files: { | |
'./css/screen.css' : './src/scss/screen.scss' | |
} | |
} | |
}, | |
jshint: { | |
options: { | |
browser: true, | |
'-W030': true, | |
globals: { | |
jQuery: true | |
}, | |
}, | |
all: ['./src/js/**/*.js', 'Gruntfile.js'] | |
}, | |
watch : { | |
options: { | |
livereload: true, | |
}, | |
twig: { | |
files: ['views/**/*.twig'] | |
}, | |
scss: { | |
files: ['**/*.scss'], | |
tasks: ['sass:dev'] | |
}, | |
scripts: { | |
files: ['./js/**/*.js', 'Gruntfile.js'], | |
tasks: ['jshint'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.registerTask('default', ['watch']); | |
grunt.registerTask('build', ['sass:dist']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment