Created
July 10, 2014 07:53
-
-
Save ErikBernskiold/ab8419cb0fd96f78d272 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'), | |
| uglify: { | |
| build: { | |
| src: 'assets/js/main.js', | |
| dest: 'assets/js/main.min.js' | |
| } | |
| }, | |
| autoprefixer: { | |
| dist: { | |
| files: { | |
| 'assets/css/layout.css': 'assets/css/layout.css' | |
| } | |
| } | |
| }, | |
| sass: { | |
| dist: { | |
| options: { | |
| style: 'compressed', | |
| sourcemap: true, | |
| }, | |
| files: { | |
| 'assets/css/layout.css': 'assets/sass/layout.scss' | |
| } | |
| } | |
| }, | |
| watch: { | |
| options: { | |
| livereload: true, | |
| }, | |
| scripts: { | |
| files: ['assets/js/*.js'], | |
| tasks: ['uglify'], | |
| options: { | |
| spawn: false, | |
| } | |
| }, | |
| css: { | |
| files: [ | |
| 'assets/sass/*.scss', | |
| ], | |
| tasks: [ 'sass', 'autoprefixer' ], | |
| options : { | |
| spawn: false, | |
| } | |
| } | |
| }, | |
| }); | |
| // Load Plugins | |
| grunt.loadNpmTasks('grunt-contrib-uglify'); | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| grunt.loadNpmTasks('grunt-contrib-sass'); | |
| grunt.loadNpmTasks('grunt-autoprefixer'); | |
| // Run! | |
| grunt.registerTask('default', ['sass', 'uglify', 'watch']); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment