react-templates/Gruntfile.js

61 lines
1.8 KiB
JavaScript
Raw Normal View History

2014-11-18 15:06:25 +01:00
'use strict';
2014-11-18 14:54:52 +01:00
module.exports = function (grunt) {
grunt.initConfig({
clean: {
main: {
src: ['playground/**/*.rt.js']
}
},
eslint: {
all: {
src: [
2014-11-18 15:06:25 +01:00
'src/**/*.js', 'playground/**/*.js',
'!playground/main.browser.js'
2014-11-18 14:54:52 +01:00
]
},
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: {
dist: {
files: {
'web/bundle.js': ['web/browser.js']
}
},
pg: {
files: {
'playground/main.browser.js': ['playground/main.js']
2014-11-18 14:54:52 +01:00
}
}
}
});
grunt.loadNpmTasks('grunt-browserify');
2014-11-18 15:06:25 +01:00
grunt.loadNpmTasks('grunt-eslint');
2014-11-18 14:54:52 +01:00
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']);
};