noflo-adapters
Version:
Packet Format Conversion for NoFlo
84 lines (72 loc) • 2.2 kB
text/coffeescript
module.exports = ->
# Project configuration
pkg: @file.readJSON 'package.json'
# CoffeeScript compilation
coffee:
spec:
options:
bare: true
transpile:
presets: ['es2015']
expand: true
cwd: 'spec'
src: ['**.coffee']
dest: 'spec'
ext: '.js'
# Browser build of NoFlo
noflo_browser:
build:
files:
'browser/noflo-adapters.js': ['package.json']
# Generate runner.html
noflo_browser_mocha:
all:
options:
scripts: ["../browser/noflo-adapters.js"]
files:
'spec/runner.html': ['spec/*.js', '!spec/fbpspec.js']
# Automated recompilation and testing when developing
watch:
files: ['spec/*.coffee', 'components/*.coffee']
tasks: ['test']
# BDD tests on Node.js
mochaTest:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
require: 'coffeescript/register'
grep: process.env.TESTS
# BDD tests on browser
mocha_phantomjs:
options:
output: 'spec/result.xml'
reporter: 'spec'
failWithOutput: true
all: ['spec/runner.html']
# Coding standards
coffeelint:
components: ['components/*.coffee']
# 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'