-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
69 lines (63 loc) · 2.4 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
64
65
66
67
68
69
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
package: grunt.file.readJSON('package.json'),
jshint: {
all: ['packages/ember-rickshaw/ember-rickshaw.js'],
options: {
jshintrc: '.jshintrc'
}
},
uglify: {
options: {
banner: '/*! <%= package.name %> by <%= package.author %> created on <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'packages/ember-rickshaw/ember-rickshaw.js',
dest: 'dist/<%= package.name %>.min.js'
}
},
concat: {
scripts: {
src: [ 'bower_components/jquery/jquery.js', 'bower_components/handlebars/handlebars.js',
'bower_components/ember/ember.js', 'bower_components/d3/d3.min.js',
'bower_components/rickshaw/rickshaw.js', 'packages/**/*.js',
'example/scripts/default.js', 'example/scripts/*.js'],
dest: 'example/dropbox/scripts.js'
},
styles: {
src: ['example/styles/*.css'],
dest: 'example/dropbox/styles.css'
}
},
yuidoc: {
compile: {
name: '<%= package.name %>',
options: {
paths: 'packages/ember-rickshaw/',
outdir: 'docs/'
}
}
},
jasmine: {
pivotal: {
src: 'packages/ember-rickshaw/ember-rickshaw.js',
options: {
specs: 'tests/spec.js',
helpers: ['bower_components/jquery/jquery.js', 'bower_components/handlebars/handlebars.js',
'bower_components/ember/ember.js', 'bower_components/rickshaw/rickshaw.js',
'bower_components/d3/d3.min.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-concat');
// Testing.
grunt.registerTask('test', ['jshint', 'jasmine']);
// Build.
grunt.registerTask('default', ['jshint', 'jasmine', 'yuidoc', 'uglify', 'concat']);
};