-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
executable file
·57 lines (55 loc) · 1.96 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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-ember-template-compiler');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-neuter');
grunt.initConfig({
jshint: {
all: ['dist/ember-data-cakephp-rest-adapter.js', 'tests/adapter_tests.js', 'tests/adapter_embedded_tests.js']
},
karma: {
unit: {
configFile: 'karma.conf.js'
}
},
neuter: {
build: {
basePath: 'src/',
src: 'src/main.js',
dest: 'dist/ember-data-cakephp-rest-adapter.js'
}
},
concat: {
test: {
src: [
'tests/lib/jquery-1.9.1.js',
'tests/lib/handlebars-1.0.0.js',
'tests/lib/ember-1.0.0.js',
'tests/lib/ember-data.js',
'tests/lib/jquery.mockjax.js',
'tests/lib/tmpl.min.js',
'dist/ember-data-cakephp-rest-adapter.js',
'tests/app.js'
],
dest: 'tests/dist/deps.min.js'
}
},
emberhandlebars: {
compile: {
options: {
templateName: function (sourceFile) {
var newSource = sourceFile.replace('tests/templates/', '');
return newSource.replace('.handlebars', '');
}
},
files: ['tests/templates/*.handlebars'],
dest: 'tests/lib/tmpl.min.js'
}
}
});
grunt.task.registerTask('test', ['build', 'jshint', 'emberhandlebars', 'concat:test', 'karma']);
grunt.task.registerTask('build', ['neuter:build']);
grunt.task.registerTask('dist', ['build']);
grunt.task.registerTask('default', ['dist']);
}