Skip to content

Few short, list-oriented functions for grunt. For those who sit on coffeescript and cares about code beauty and clarity.

Notifications You must be signed in to change notification settings

spacegangster/grunt-functionalize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# potential Gruntfile.coffee
module.exports = (grunt) ->
  { concat          # concatenate lists
    contrib         # prepends 'grunt-contrib-' to list of strings
    initConfig      # vs grunt.initConfig
    loadNpmTasks    # takes a list of npm tasks
    log             # grunt.log.writeln
    readJSON        # grunt.file.readJSON
    registerTasks   # special flavor of grunt.registerTask. Works with list of lists.
  } = ((require 'grunt-functionalize') grunt)

  initConfig
    pkg: (readJSON 'package.json')
    # ... your usual config ...

  (loadNpmTasks (concat (contrib [ 'clean'
                                   'coffee'
                                   'copy'
                                   'less'
                                   'uglify'
                                   'watch' ] ), 
                        [ 'grunt-groundskeeper' ] ) )
  (registerTasks [ [ 'compile:dev', [ 'less:development'
                                      'coffee'             ] ]
                   [ 'dev'        , [ 'compile:dev'
                                      'copy:lib_js'
                                      'copy:jquery-ui.css' ] ]
                   [ 'build'      , [ 'clean:js'
                                      'less:production'
                                      'coffee'
                                      'uglify'
                                      'copy:lib_build'
                                      'copy:build_js'      ] ]
                   [ 'default'    , [ 'dev'                ] ] ] )

About

Few short, list-oriented functions for grunt. For those who sit on coffeescript and cares about code beauty and clarity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages