Skip to content

Commit

Permalink
Add specification tasks to Jakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk committed May 10, 2015
1 parent 114cb95 commit c83a561
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion Jakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ var fs = require('fs'),
chalk = require('chalk')

var paths = {
typescriptSrc: 'src/**/*.ts'
typescriptSrc: 'src/**/*.ts',
specificationHummingbirdSources: 'test/spec/*.hb',
specificationJavascriptSources: 'test/spec/*.js'
}

function exec (cmd, opts) {
Expand All @@ -23,6 +25,29 @@ file('lib/std.o', ['ext/std.c'], function () {
desc('Default building actions')
task('default', ['lib/std.o'])


// Specification -------------------------------------------------------------

namespace('specification', function () {
desc('Generate specification tests')
task('generate', function () {
exec('node share/gen-spec.js')
})

desc('Remove specification files')
task('clean', function () {
function removeFiles (files) {
for (var i = 0; i < files.length; i++) {
var f = files[i]
fs.unlinkSync(f)
}
}
removeFiles(glob.sync(paths.specificationJavascriptSources))
removeFiles(glob.sync(paths.specificationHummingbirdSources))
})
})


// TypeScript ----------------------------------------------------------------

var typescript = null
Expand Down

0 comments on commit c83a561

Please sign in to comment.