Last active
August 29, 2015 14:06
-
-
Save dunckr/a3147e325bbe6c0fe8a7 to your computer and use it in GitHub Desktop.
assemble json
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({ | |
assemble: { | |
options: { | |
flatten: true, | |
layoutdir: 'templates/layouts', | |
partials: 'templates/partials/*.hbs', | |
helpers: 'templates/helpers/*.js', | |
}, | |
markdown: { | |
options: { | |
ext: '.html', | |
engine: 'handlebars', | |
}, | |
files: { | |
'public/': ['contents/**/*.md'] | |
} | |
} | |
}, | |
m2j: { | |
release: { | |
options: { | |
minify: false, | |
width: 60 | |
}, | |
files: { | |
'templates/data/example.json': ['contents/example/*.md'] | |
}, | |
} | |
}, | |
watch: { | |
scripts: { | |
files: ['contents/*.html','templates/**/*.hbs'], | |
tasks: ['cssmin','assemble'], | |
}, | |
}, | |
clean: ['public'] | |
}); | |
grunt.loadNpmTasks('assemble'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-markdown-to-json'); | |
grunt.registerTask('build', ['clean', 'm2j', 'assemble']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment