UNPKG

single-tls-tunnel

Version:

A single port TLS tunnel implementation to support a single downstream client proxy

94 lines (87 loc) 2.11 kB
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-shell'); function getLintConfig() { return { options: { curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, sub: true, undef: true, boss: true, eqnull: true, es5: true, strict: false }, globals: { } }; } function getNodeLintConfig() { var config = getLintConfig(); config.options.node = true; return config; } function getNodeTestLintConfig() { var config = getNodeLintConfig(); config.globals.describe = false; config.globals.it = false; config.globals.before = false; config.globals.after = false; config.globals.beforeEach = false; config.globals.afterEach = false; return config; } // Project configuration. grunt.initConfig({ lint: { node: ['grunt.js', 'src/**/*.js'], nodeTest: ['test/src/**/*.js'] }, jshint: { node: getNodeLintConfig(), nodeTest: getNodeTestLintConfig() }, mochaTest: { test: ['test/src/**/*.js'], doc: ['test/src/**/*.js'] }, mochaTestConfig: { test: { options: { reporter: 'nyan' } }, doc: { options: { reporter: 'doc' } } }, shell: { generateKeys: { command: (process.platform === 'win32') ? '.\\keys.bat' : './keys.sh', execOptions: { cwd: './test/keys' } }, _options: { stdout: true, stderr: true, failOnError: true }, }, watch: { files: ['grunt.js', 'src/**/*.js', 'test/src/**/*.js'], tasks: ['default'] } }); // Default task. grunt.registerTask('default', 'lint shell:generateKeys mochaTest:test'); // Documentation task. grunt.registerTask('doc', 'mochaTest:doc'); };