write grunt config in yaml.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.js
package.json

README.md

Write grunt config in yaml.

$ npm install gruntfile-yaml

grunt.yaml

config:
    sass:
        build:
            files:
                static/css/style/css: client/sass/main.sass
    jshint:
        build:
            src:
                - client/js/**/*.js
            options:
                jshintrc: true
    watch:
        options:
            livereload: true
        sass:
            files:
                - client/sass/**/*.sass
            tasks: sass
            options:
                nospawn: true

npm:
    - grunt-contrib-watch
    - grunt-contrib-sass
    - grunt-contrib-jshint

tasks:
    build:
        - sass
        - jshint
    default:
        - build

Gruntfile.js

module.exports = require('gruntfile-yaml')

or if you need to programatically manipulate the config:

module.exports = function (grunt) {
    require('gruntfile-yaml')(grunt, function (data) {
        data.config.jshint.build.options.reporter = require('jshint-stylish')
    })
}