forked from steveathon/bootstrap-wysiwyg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
74 lines (71 loc) · 2.24 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['gruntfile.js', 'gulpfile.js', 'src/**/*.js']
},
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-release');
grunt.registerTask('default', ['jshint', 'bootlint', 'checkPages', 'uglify', 'watch']);
};