Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (50 sloc) 2.032 kb
module.exports = gruntFunction = (grunt) ->
gruntConfig =
urequire: # eat your own dogfood
dependencies: imports:
lodash: '_'
uberscore: '_B'
'utils/UError': 'UError'
[ '+inject-_B.logger', ['**/*.js'],
(m)-> m.beforeBody = "var l = new _B.Logger('uRequire/#{m.path}');"] ]
runtimeInfo: false
bare: true
template: name: 'nodejs'
path: 'source/code'
dstPath: 'build/code'
main: 'urequire'
template: banner: true
resources: [ 'inject-version' ]
path: 'source/spec'
dstPath: 'build/spec'
copy: /./
chai: 'chai'
specHelpers: 'spH'
replace: '../code/utils/UError' : 'utils/UError'
resources: [
specHelpers: """
equal, notEqual, ok, notOk, tru, fals, deepEqual, notDeepEqual, exact, notExact, iqual,
notIqual, ixact, notIxact, like, notLike, likeBA, notLikeBA, equalSet, notEqualSet"""
chai: 'expect' ] ]
afterBuild: require('urequire-ab-specrunner').options
mochaOptions: "-t 10000 --bail"
specWatch: derive: 'spec', watch: after: 'copy'
copy: wiki: files: [ expand: true, cwd: "source/code/config", src: ["*.md"], dest: "../"]
clean: build: 'build', temp: 'temp'
splitTasks = (tasks)-> if (tasks instanceof Array) then tasks else tasks.split(/\s/).filter((f)->!!f)
grunt.registerTask shortCut, "urequire:#{shortCut}" for shortCut of gruntConfig.urequire
grunt.registerTask shortCut, splitTasks tasks for shortCut, tasks of {
default: 'clean lib spec'
develop: 'clean lib specWatch'
"alt-c": "copy" # IDE shortcuts
"alt-b": "lib"
grunt.loadNpmTasks task for task of grunt.file.readJSON('package.json').devDependencies when task.lastIndexOf('grunt-', 0) is 0
grunt.initConfig gruntConfig
Jump to Line
Something went wrong with that request. Please try again.