3 module
.exports = function(grunt
){
4 require('load-grunt-tasks')(grunt
);
6 var pkg
= grunt
.file
.readYAML('package.yml');
16 name
: 'mootools-core-compat',
18 specs
: 'Specs/**/*.js'
21 name
: 'mootools-core',
24 specs
: 'Specs/**/*.js'
27 name
: 'mootools-core-server',
29 components
: ['Core/Core', 'Core/Array', 'Core/String', 'Core/Number', 'Core/Function', 'Core/Object', 'Core/Class', 'Core/Class.Extras', 'Core/Class.Thenable', 'Core/JSON'],
30 strip
: ['1.2compat', '1.3compat', '1.4compat', '*compat', 'IE', 'ltIE8', 'ltIE9', '!ES5', '!ES5-bind', 'webkit', 'ltFF4'],
31 specs
: ['Specs/Core/*.js', 'Specs/Class/*.js', 'Specs/Types/*.js', 'Specs/Utilities/JSON.js'],
36 enabled
: (process
.env
.TRAVIS
=== 'true'),
37 pullRequest
: (process
.env
.TRAVIS_PULL_REQUEST
!== 'false'),
38 browser
: process
.env
.BROWSER
,
39 build
: process
.env
.BUILD
42 username
: process
.env
.SAUCE_USERNAME
,
43 accessKey
: process
.env
.SAUCE_ACCESS_KEY
48 if (grunt
.option('file') || grunt
.option('module')){
49 Object
.getOwnPropertyNames(config
.environment
.build
).forEach(function(name
){
50 var build
= config
.environment
.build
[name
];
51 if (grunt
.option('file')){
52 if (build
.components
== null || build
.components
.indexOf('Core/' + grunt
.option('file')) !== -1){
53 build
.components
= 'Core/' + grunt
.option('file');
54 build
.specs
= grunt
.file
.match('Specs/**/' + grunt
.option('file') + '.js', grunt
.file
.expand(build
.specs
));
56 build
.components
= [];
60 if (grunt
.option('module')){
61 build
.specs
= grunt
.file
.match('Specs/' + grunt
.option('module') + '/**.js', grunt
.file
.expand(build
.specs
));
66 grunt
.initConfig(config
);
67 grunt
.util
.linefeed
= '\n';
69 grunt
.file
.expand('./Grunt/options/*.js').forEach(function(file
){
70 grunt
.config
.merge(require(file
)(grunt
));
73 grunt
.loadTasks('Grunt/tasks');