This repository has been archived by the owner on Jul 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 533
/
gruntfile.js
60 lines (59 loc) · 1.84 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['gruntfile.js', 'lib/js/emojione.js']
},
jsonlint: {
files: {
src: ['emoji.json','emoji_strategy.json']
}
},
// BUILD EMOJI ONE AWESOME CSS (SASS -> CSS)
sass: {
dist: {
files: {
'extras/css/emojione-awesome.css': 'lib/emojione-awesome/emojione-awesome.scss'
}
}
},
uglify: {
options: {
// the banner is inserted at the top of the output
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n',
mangle: false,
ASCIIOnly: true
},
dist: {
files: {
'lib/js/<%= pkg.name %>.min.js': ['lib/js/<%= pkg.name %>.js']
}
}
},
// Minify Project CSS
cssmin: {
target: {
files: {
'extras/css/emojione.min.css': ['extras/css/emojione.css']
}
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
},
// run QUnit tests
qunit: {
all: ['lib/js/tests/tests.html']
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jsonlint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.registerTask('default', ['jshint','jsonlint', 'sass', 'uglify', 'cssmin']);
grunt.registerTask('travis', ['qunit']);
};