Skip to content

Instantly share code, notes, and snippets.

@dunckr
Last active August 29, 2015 14:06
Show Gist options
  • Save dunckr/a3147e325bbe6c0fe8a7 to your computer and use it in GitHub Desktop.
Save dunckr/a3147e325bbe6c0fe8a7 to your computer and use it in GitHub Desktop.
assemble json
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