From 80fdb2aa01d84418d33d18dbbe08afd3e96b49f1 Mon Sep 17 00:00:00 2001 From: ido Date: Tue, 18 Nov 2014 15:54:52 +0200 Subject: [PATCH] add grunt --- Gruntfile.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..e09a4f9 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,60 @@ +module.exports = function (grunt) { + 'use strict'; + grunt.initConfig({ + clean: { + main: { + src: ['playground/**/*.rt.js'] + } + }, + eslint: { + all: { + src: [ + 'src/**/*.js' + ] + }, + teamcity: { + options: { + format: 'checkstyle', + 'output-file': 'target/eslint.xml' + }, + src: ['<%= eslint.all.src %>'] + } + }, + jasmine_node: { + options: { + forceExit: true, + match: '.', + matchall: false, + specNameMatcher: 'spec', + extensions: 'js' + }, + all: ['server/test'], + grunt: ['conf/tasks/test'] + }, + browserify: { + options: { + }, + dist: { + files: { + 'web/bundle.js': ['web/browser.js'] + } + }, + pg: { + files: { + 'playground/main.browser2.js': ['playground/main.js'] + } + } + } + }); + + grunt.loadNpmTasks('grunt-browserify'); + + grunt.registerTask('default', ['eslint', 'build_sources', 'check', 'build']); + grunt.registerTask('test', ['jasmine_node']); + + grunt.registerTask('teamcity-check', ['eslint:teamcity'/*, 'scsslint'*/]); + grunt.registerTask('teamcity', ['build_sources', 'teamcity-check', 'packages:teamcity', 'static-upload-to-s3']); + grunt.registerTask('teamcity-test', ['jasmine_node', 'karma:teamcity', 'cssTest']); + + grunt.registerTask('all', ['install', 'default', 'test']); +};