bypass spec if on compat testing
[mootools.git] / Gruntfile.js
blob61ea8f4cc8882a09376a3acb95a8265a682cc98f
1 "use strict";
3 module.exports = function(grunt){
5         grunt.loadNpmTasks('grunt-mootools-packager');
6         grunt.loadNpmTasks('grunt-karma');
7         grunt.loadNpmTasks('grunt-contrib-clean');
9         grunt.initConfig({
11                 'packager': {
13                         options: {
14                                 name: 'Core'
15                         },
17                         all: {
18                                 src: 'Source/**/*.js',
19                                 dest: 'mootools-all.js'
20                         },
22                         nocompat: {
23                                 options: {
24                                         strip: ['.*compat'],
25                                         only: '<%= grunt.option("file") && "Core/" + grunt.option("file") %>'
26                                 },
27                                 src: 'Source/**/*.js',
28                                 dest: 'mootools-nocompat.js'
29                         },
31                         specs: {
32                                 options: {
33                                         name: 'Specs'
34                                 },
35                                 src: 'Specs/<%= grunt.option("module") || "**" %>/<%= grunt.option("file") || "*" %>.js',
36                                 dest: 'mootools-specs.js'
37                         },
39                         'specs-nocompat': {
40                                 options: {
41                                         name: 'Specs',
42                                         strip: ['.*compat'],
43                                         only: '<%= grunt.option("file") && "Specs/" + grunt.option("file") %>'
44                                 },
45                                 src: 'Specs/**/*.js',
46                                 dest: 'mootools-specs.js'
47                         }
49                 },
51                 'karma': {
53                         options: {
54                                 browsers: ['PhantomJS'],
55                                 frameworks: ['jasmine', 'sinon'],
56                                 files: ['http://rawgithub.com/bitovi/legacy-syn/master/dist/syn.js', 'mootools-*.js']
57                         },
59                         continuous: {
60                                 singleRun: true
61                         },
63                         dev: {
64                                 reporters: 'dots'
65                         }
67                 },
69                 'clean': {
70                         all: {
71                                 src: 'mootools-*.js'
72                         }
73                 }
75         });
77         grunt.registerTask('default', ['clean', 'packager:all', 'packager:specs', 'karma:continuous']);
78         grunt.registerTask('nocompat', ['clean', 'packager:nocompat', 'packager:specs-nocompat', 'karma:continuous'])