Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.
/ grunt-liquid Public archive
forked from mrcljx/grunt-liquid

Grunt package to compile Liquid (liquid-node) templates

License

Notifications You must be signed in to change notification settings

cloudbitsio/grunt-liquid

 
 

Repository files navigation

grunt-liquid Build Status

Compile Liquid (node-liquid) templates.

Getting Started

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.

Documentation

See the grunt docs on how to configure tasks and more advanced usage.

Gruntfile Configuration

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']);

package.json Configuration

  "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".


License

MIT © Marcel Jackwerth. Forked from sirlantis and Mixture.io

About

Grunt package to compile Liquid (liquid-node) templates

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%