-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
44 lines (33 loc) · 1.69 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
var gruntHelper = require('betajs-compile');
var dist = 'betajs-shims';
gruntHelper.init(pkg, grunt)
/* Compilation */
.concatTask('concat-shims', ['src/*.js'], 'dist/' + dist + '.js')
.uglifyTask('uglify-shims', 'dist/' + dist + '.js', 'dist/' + dist + '.min.js')
/* Testing */
.qunitjsTask("qunit-betajs-shims", ['dist/' + dist + '.js', 'tests/tests'])
.qunitjsTask("qunit-removal-betajs-shims", ['tests/node/removals.js'])
.qunitjsTask("qunit-vanilla", ['tests/tests'])
.closureTask(null, ["./dist/" + dist + ".js"])
.browserstackTask("browserstack-removal-betajs-shims", 'tests/tests-removal-betajs-shims.html', {desktop: true, mobile: true})
.browserstackTask("browserstack-betajs-shims", 'tests/tests-betajs-shims.html', {desktop: true, mobile: true})
.lintTask(null, ['./src/**/*.js', './dist/' + dist + '.js', './Gruntfile.js', './tests/**/*.js'])
/* External Configurations */
.codeclimateTask()
.travisTask(null, "4.0")
/* Dependencies */
.dependenciesTask(null, { github: [
'douglascrockford/JSON-js/json2.js'
] })
/* Markdown Files */
.readmeTask()
.licenseTask()
.autoincreasepackageTask(null, "package-source.json")
.packageTask();
grunt.initConfig(gruntHelper.config);
grunt.registerTask('default', ['autoincreasepackage', 'package', 'readme', 'license', 'codeclimate', 'travis', 'concat-shims', 'uglify-shims']);
grunt.registerTask("qunit", ['qunit-betajs-shims', 'qunit-removal-betajs-shims', 'qunit-vanilla']);
grunt.registerTask('check', ['lint', 'qunit']);
};