1.5.1 • Published 10 years ago

grunt-ristretto v1.5.1

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

grunt-ristretto

Frontend development with Latte.

Getting Started (If you're not sure what you're doing)

See RistrettoExample

Getting Started (If you know what you're doing)

This plugin requires Grunt ~0.4.0 and Composer with PHP >= 5.3.0.

npm install grunt-ristretto --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-ristretto');

The "ristretto" task

Overview

In your project's Gruntfile, add a section named ristretto to the data object passed into grunt.initConfig().

grunt.initConfig({
  ristretto: {
    options: {
      port: 2013,
      www_dir: 'www',
      latte_dir: 'www',
      model_dir: 'www/model',
      publish_dir: 'publish'
    }
  },
})

Your Gruntfile.js might look like this.

Dont forget to install theese dependencies grunt-contrib-less and grunt-contrib-watch in your npm package.json.

npm install grunt-contrib-less grunt-contrib-watch --save-dev
module.exports = function (grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    less: {
      production: {
        options: {
          yuicompress: true
        },
        files: {
          "www/css/screen.css": "www/less/screen.less",
          "www/css/print.css": "www/less/print.less"
        }
      }
    },
    watch: {
      styles: {
        files: ['www/**/*.less'],
        tasks: ['less', 'ristretto:stylesheets']
      },
      scripts: {
        files: ['www/**/*', '!www/**/*.css', '!www/**/*.less'],
        tasks: ['ristretto:pages']
      }
    },
    ristretto: {
      options: {
        model_dir: 'www/model',
        latte_dir: 'www',
        www_dir: 'www',
        port: 2013
      },
      server: {},
      publish: {},
      stylesheets: {},
      pages: {}
    }
  });

  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-ristretto');

  grunt.registerTask('default', ['ristretto:server', 'less', 'ristretto:pages', 'watch']);
};
1.5.1

10 years ago

1.5.0

10 years ago

1.4.5

10 years ago

1.4.4

10 years ago

1.4.3

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.9

10 years ago

1.2.8

10 years ago

1.2.7

10 years ago

1.2.5

10 years ago

1.2.4

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.5.0

11 years ago

0.4.1

11 years ago

0.4.0

11 years ago

0.3.3

11 years ago

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.8

11 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.0

11 years ago