This repository has been archived by the owner on May 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.js
70 lines (67 loc) · 2.38 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
70
module.exports = function(grunt) {
grunt.initConfig({
bower: grunt.file.readJSON('bower.json'),
concat: {
options: {
banner: '/*!\n' +
' * @name <%= bower.name %>\n' +
' * @version v<%= bower.version %>\n' +
' * @author <%= bower.authors[0] %>\n' +
' * @see <%= bower.homepage %>\n' +
' */\n' +
';(function(root, factory) {\n' +
' if (typeof module === \'object\' && typeof module.exports === \'object\') {\n' +
' module.exports = factory(require(\'jquery\'));\n' +
' } else {\n' +
' root.jQuery.fly = factory(root.jQuery);\n' +
' }\n' +
'})(this, function($) {\n',
footer: ' return fly;\n' +
'});'
},
full: {
src: [
'src/fly.js',
'src/component.base.js',
'src/mixin.rect.js',
'src/mixin.position.js',
'src/component.tooltip.js',
'src/component.dropdown.js',
'src/fly.functions.js',
'src/jquery.fly.js'
],
dest: 'fly.full.js'
}
},
watch: {
src: {
files: ['Gruntfile.js', 'src/*.js', 'src/*.css'],
tasks: ['concat', 'jshint', 'postcss:dist']
}
},
jshint: {
options: {
jshintrc: true
},
all: ['Gruntfile.js', 'src/*.js', '*.js']
},
postcss: {
options: {
processors: [
require('autoprefixer')({
browsers: ['last 2 versions']
})
]
},
dist: {
src: 'src/popover.css',
dest: 'css/popover.css'
}
}
});
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['concat', 'jshint', 'postcss:dist']);
};