noflo-legoev3
Version:
NoFlo components for a LEGO Mindstorms EV3
95 lines (81 loc) • 2.5 kB
text/coffeescript
module.exports = ->
# Project configuration
pkg: @file.readJSON 'package.json'
# Updating the package manifest files
noflo_manifest:
update:
files:
'component.json': ['graphs/*', 'components/*']
'package.json': ['graphs/*', 'components/*']
# CoffeeScript compilation of tests
coffee:
spec:
options:
bare: true
expand: true
cwd: 'spec'
src: ['**.coffee']
dest: 'spec'
ext: '.js'
# Browser build of NoFlo
noflo_browser:
build:
files:
'browser/noflo-legoev3.js': ['component.json']
# JavaScript minification for the browser
uglify:
options:
report: 'min'
noflo:
files:
'./browser/noflo-legoev3.min.js': ['./browser/noflo-legoev3.js']
# Automated recompilation and testing when developing
watch:
files: ['spec/*.coffee', 'components/*.coffee']
tasks: ['test']
# BDD tests on Node.js
cafemocha:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
# BDD tests on browser
mocha_phantomjs:
options:
output: 'spec/result.xml'
reporter: 'spec'
all: ['spec/runner.html']
# Coding standards
coffeelint:
components: ['Gruntfile.coffee', 'spec/*.coffee', 'components/*.coffee']
options:
'max_line_length':
'level': 'ignore'
# Grunt plugins used for building
# Grunt plugins used for testing
# Our local tasks
if target is 'all' or target is 'browser'
if target is 'all' or target is 'nodejs'
if target is 'all' or target is 'browser'