Skip to content

Commit c3b2f0d

Browse files
author
Rashid Khan
committed
Initial commit
1 parent 8057543 commit c3b2f0d

21 files changed

+1246
-0
lines changed

Gruntfile.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
'use strict';
2+
3+
module.exports = function (grunt) {
4+
5+
var pre = [
6+
'src/pre.js',
7+
'src/shared.js',
8+
'src/serializer.js',
9+
'src/serializer/*',
10+
'src/selector.js',
11+
'src/logger/*',
12+
'src/transport.js'
13+
];
14+
15+
var post = ['src/client.js','src/post.js'];
16+
17+
// Project configuration.
18+
grunt.initConfig({
19+
pkg: grunt.file.readJSON('package.json'),
20+
meta: {
21+
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
22+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
23+
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
24+
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
25+
' Licensed <%= pkg.license %> */\n\n'
26+
},
27+
concat: {
28+
options: {
29+
banner: '<%= meta.banner %>'
30+
},
31+
node: {
32+
src: pre.concat(['src/transport/elasticsearch-node.js'],post),
33+
dest: 'dist/elasticsearch-node.js'
34+
}
35+
},
36+
nodeunit: {
37+
files: ['test/**/*.js']
38+
},
39+
jshint: {
40+
files: ['Gruntfile.js', '<%= concat.node.dest %>', 'test/**/*.js' ],
41+
options: {
42+
bitwise: true,
43+
curly: true,
44+
eqeqeq: true,
45+
immed: true,
46+
indent: 2,
47+
latedef: true,
48+
newcap: true,
49+
noarg: true,
50+
sub: true,
51+
undef: true,
52+
boss: true,
53+
eqnull: true,
54+
globalstrict: true,
55+
devel: true,
56+
node: true,
57+
globals: {
58+
exports: true,
59+
module: false
60+
}
61+
}
62+
}
63+
});
64+
65+
// load plugins
66+
grunt.loadNpmTasks('grunt-contrib-concat');
67+
grunt.loadNpmTasks('grunt-contrib-nodeunit');
68+
grunt.loadNpmTasks('grunt-contrib-jshint');
69+
70+
71+
// Default task.
72+
grunt.registerTask('default', ['concat','nodeunit','jshint']);
73+
74+
};

0 commit comments

Comments
 (0)