grunt-liquid
Compile Liquid (node-liquid) templates.
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
npm install --save-dev app-team/grunt-liquid
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-liquid');
Tip: the load-grunt-tasks module makes it easier to load multiple grunt tasks.
See the grunt docs on how to configure tasks and more advanced usage.
grunt.initConfig({
liquid: {
options: {
includes: ['views/includes/', 'views/layouts/']
},
pages: {
files: [{
expand: true,
flatten: true,
src: ["views/**/*.liquid", "!views/includes/*.liquid", "!views/layouts/*.liquid"],
dest: 'public/',
ext: '.html'
}]
}
}, // end liquid
watch: {
liquidTask: {
options: {
spawn: false,
},
files: "views/**/*.liquid",
tasks: ['liquid']
}
} // end watch
});
grunt.loadNpmTasks('grunt-liquid');
grunt.registerTask('default', ['liquid']);
"devDependencies": {
"grunt-liquid": "app-team/grunt-liquid.git"
}
From NPM docs:
As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project".
MIT © Marcel Jackwerth. Forked from sirlantis and Mixture.io