-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
63 lines (59 loc) · 1.82 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
version: '<%= pkg.version %>',
banner: '// Jenga: fuck z-indexes\n' +
'// ----------------------------------\n' +
'// v<%= pkg.version %>\n' +
'//\n' +
'// Copyright (c)<%= grunt.template.today("yyyy") %> Jason Strimpel\n' +
'// Distributed under MIT license\n'
},
preprocess: {
global: {
files: {
'dist/jenga.js': 'src/jenga.global.js'
}
},
amd: {
files: {
'dist/jenga.amd.js': 'src/jenga.amd.js'
}
},
plugin: {
files: {
'dist/jenga.plugin.js': 'src/jenga.plugin.js'
}
}
},
concat: {
options: {
banner: "<%= meta.banner %>"
},
global: {
src: 'dist/jenga.js',
dest: 'dist/jenga.js'
},
amd: {
src: 'dist/jenga.amd.js',
dest: 'dist/jenga.amd.js'
},
plugin: {
src: 'dist/jenga.plugin.js',
dest: 'dist/jenga.plugin.js'
}
},
mocha_phantomjs: {
all: ['test/**/*.html']
}
});
grunt.loadNpmTasks('grunt-preprocess');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-mocha-phantomjs');
grunt.registerTask('test', ['mocha_phantomjs']);
grunt.registerTask('default', [
'preprocess:global', 'concat:global', 'preprocess:amd', 'concat:amd', 'preprocess:plugin', 'concat:plugin'
]);
};