module.exports = function (grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
files: { | |
'css/global.css': 'sass/global.scss' | |
}, | |
options: { | |
sourcemap: 'true' | |
} | |
} | |
}, | |
autoprefixer: { | |
options: { | |
browsers: ['last 2 versions'] | |
}, | |
dist: { | |
files: { | |
'css/global.css': 'css/global.css' | |
} | |
} | |
}, | |
watch: { | |
sass: { | |
files: ['sass/**/*.scss'], | |
tasks: ['sass:dist'] | |
}, | |
styles: { | |
files: ['css/global.css'], | |
tasks: ['autoprefixer'] | |
}, | |
livereload: { | |
files: ['*.html', '*.php', 'js/**/*.{js,json}', 'css/global.css', 'img/**/*.{png,jpg,jpeg,gif,webp,svg}'], | |
options: { | |
livereload: true | |
} | |
} | |
} | |
}); | |
grunt.registerTask('default', ['watch']); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-autoprefixer'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment