module.exports = function (grunt) { grunt.initConfig({ sass: { dev: { options: { style: 'compact' }, files: { 'assets/css/agaric.css': 'sass/agaric.scss' } } }, assemble: { dev: { options: { flatten: true, data: 'design-source/data/*.{json,yml}', layout: false, partials: 'design-source/templates/**/*.hbs' }, files: [ { expand: true, cwd: 'design-source/pages', src: '**/*.{hbs,md}', dest: 'design-output/' } ] } }, clean: ['design-output/*.html'], connect: { preview: { options: { base: ['./'], port: 9000, hostname: 'localhost', keepalive: false, livereload: 35729, open: 'http://0.0.0.0:9000/design-output' } } }, watch: { templates: { files: [ 'design-source/templates/**/*.{hbs,md}', 'design-source/pages/**/*.{hbs,md}', 'design-source/data/**/*.json', 'sass/**/*.scss', ], tasks: ['assemble','sass:dev'] }, livereload: { options: { livereload: '<%= connect.preview.options.livereload %>' }, files: ['design-output/**.*'] } }, shell: { target: { command: './node_modules/.bin/kss --config sass/styleguide-config.json --verbose' } } }); grunt.loadNpmTasks('assemble'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-sass'); grunt.loadNpmTasks('grunt-shell'); grunt.loadNpmTasks('grunt-kss'); grunt.registerTask('kss',['shell']); grunt.registerTask('build', ['clean', 'assemble', 'sass:dev']); grunt.registerTask('server', ['build','connect','watch']); grunt.registerTask('default', ['server']); };