guv
Version:
Grid Utilization Virgilante
57 lines (47 loc) • 1.3 kB
text/coffeescript
module.exports = ->
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
# BDD tests on Node.js
mochaTest:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
grep: process.env['TESTS']
# Coding standards
coffeelint:
components:
files:
src: ['spec/*.coffee', 'src/*.coffee', 'ui/*.coffee']
options:
max_line_length:
value: 100
level: 'warn'
# Browser build
browserify:
options:
transform: [
['coffeeify']
]
browserifyOptions:
extensions: ['.coffee']
fullPaths: false
src:
files:
'browser/guv.js': ['index.js']
options:
watch: true
# Grunt plugins used for building
@loadNpmTasks 'grunt-browserify'
# Grunt plugins used for testing
@loadNpmTasks 'grunt-mocha-test'
@loadNpmTasks 'grunt-coffeelint'
# Our local tasks
@registerTask 'build', 'Build the chosen target platform', (target = 'all') =>
@task.run 'browserify'
@registerTask 'test', 'Build and run automated tests', (target = 'all') =>
@task.run 'coffeelint'
@task.run 'build'
@task.run 'mochaTest'
@registerTask 'default', ['test']