-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
gruntfile.js
91 lines (88 loc) · 2.68 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = function( grunt ) {
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
jshint: {
all: {
src: [
"gruntfile.js", "gulpfile.js", "src/**/*.js"
],
options: {
jshintrc: true
}
}
},
jscs: {
src: [ "gruntfile.js", "gulpfile.js", "src/**/*.js" ],
options: {
config: ".jscsrc",
fix: true // Autofix code style violations when possible
}
},
bootlint: {
options: {},
files: [ "*.html", "examples/**/*.html" ]
},
checkPages: {
development: {
options: {
pageUrls: [
"index.html",
"examples/basic.html",
"examples/clear-formatting.html",
"examples/events.html",
"examples/form-post.html",
"examples/formatblock-example.html",
"examples/html-editor.html",
"examples/multiple-editors.html",
"examples/simple-toolbar.html"
],
checkLinks: true,
summary: true
}
}
},
uglify: {
options: {
banner: "/* @fileoverview \n" +
" * Provides full Bootstrap based, multi-instance WYSIWYG editor.\n" +
" *\n" +
" * Name = " + "<%= pkg.name %>\n" +
" * Author = " + "Various, see LICENCE\n" +
" * Version = " + "v<%= pkg.version %>\n" +
" * About = " + "A tiny Bootstrap and jQuery based WYSIWYG rich text editor" +
" based on the browser function execCommand.\n*/\n\n"
},
dist: {
files: {
"js/bootstrap-wysiwyg.min.js": [ "src/**/*.js" ]
}
}
},
release: {
options: {
additionalFiles: [ "bower.json", "src/bootstrap-wysiwyg.js" ],
commit: false,
npm: false,
npmTag: false,
push: false,
pushTags: false,
tag: false
}
},
watch: {
files: [ "gruntfile.js", "gulpfile.js", "src/**/*.js", "*.html", "examples/**/*.html" ],
tasks: [ "jshint", "bootlint", "checkPages", "uglify" ]
}
} );
grunt.loadNpmTasks( "grunt-check-pages" );
grunt.loadNpmTasks( "grunt-bootlint" );
grunt.loadNpmTasks( "grunt-contrib-jshint" );
grunt.loadNpmTasks( "grunt-contrib-rename" );
grunt.loadNpmTasks( "grunt-contrib-uglify" );
grunt.loadNpmTasks( "grunt-contrib-watch" );
grunt.loadNpmTasks( "grunt-jscs" );
grunt.loadNpmTasks( "grunt-release" );
grunt.registerTask( "default", [ "lint", "watch" ] );
grunt.registerTask( "lint", [ "jshint", "jscs", "bootlint", "checkPages" ] );
grunt.registerTask( "deploy", [ "lint", "uglify" ] );
};