-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·143 lines (140 loc) · 6.13 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
, jshint: {
options: {
curly: true
, eqeqeq: true
, eqnull: true
, browser: true
, force: true
, laxcomma: true
, globals: {
jQuery: true
, $dhx: true
, dhtmlx: true
, dhtmlXLayoutObject: true
}
, reporter: require('jshint-stylish')
, }
, uses_defaults: [
'dhx.js', 'dhx.dataDriver.js', 'dhx.REST.js', 'dhx.ui.js', 'dhx.ui.data.js', 'dhx.ui.crud.js', 'dhx.ui.crud.simple.View.js'
, 'dhx.ui.crud.simple.View.Record.js', 'dhx.ui.crud.simple.View.FormWindow.js', 'dhx.ui.crud.simple.View.settings.js', 'latinize.js', 'dhx.MQ.js'
, 'dhx.ui.crud.simple.View.Search.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.socket.js', 'dhx.xml.js', 'dhx.ui.crud.simple.js', 'dhx.ui.i18n.js'
, 'dhx.ui.i18n.pt-br.js', 'dhx.ui.i18n.en-us.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.ui.Application.js', 'dhx.ui.Session.js', 'dhx.ui.desktop.js'
, 'dhx.ui.desktop.settings.js', 'dhx.ui.desktop.view.js', 'dhx.ui.desktop.view.ActiveDesktop.js', 'dhx.ui.desktop.view.TopBar.js'
, 'dhx.ui.desktop.view.SideBar.js', 'shim.js', 'dhx.crypt.js', 'dhx.Encoder.js', 'dhx.shortcut.js', 'dhx.Request.js', 'dhx.cookie.js', 'dhx.dhtmlx.js'
]
, with_overrides: {
options: {
curly: false
, undef: true
, }
, files: {
src: []
}
, }
}
, jsbeautifier: {
files: ['dhx.js', 'dhx.dataDriver.js', 'dhx.REST.js', 'dhx.ui.js', 'dhx.ui.data.js', 'dhx.ui.crud.js', 'dhx.ui.crud.simple.View.js'
, 'dhx.ui.crud.simple.View.Record.js', 'dhx.ui.crud.simple.View.FormWindow.js', 'dhx.ui.crud.simple.View.settings.js', 'latinize.js', 'dhx.MQ.js'
, 'dhx.ui.crud.simple.View.Search.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.socket.js', 'dhx.xml.js', 'dhx.ui.crud.simple.js', 'dhx.ui.i18n.js'
, 'dhx.ui.i18n.pt-br.js', 'dhx.ui.i18n.en-us.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.ui.Application.js', 'dhx.ui.Session.js', 'dhx.ui.desktop.js'
, 'dhx.ui.desktop.settings.js', 'dhx.ui.desktop.view.js', 'dhx.ui.desktop.view.ActiveDesktop.js', 'dhx.ui.desktop.view.TopBar.js'
, 'dhx.ui.desktop.view.SideBar.js', 'shim.js', 'dhx.crypt.js', 'dhx.Encoder.js', 'dhx.shortcut.js', 'dhx.Request.js', 'dhx.cookie.js', 'dhx.dhtmlx.js']
, options: {
//config: "path/to/configFile",
js: {
braceStyle: "collapse"
, breakChainedMethods: false
, e4x: false
, evalCode: false
, indentChar: " "
, indentLevel: 0
, indentSize: 4
, indentWithTabs: false
, jslintHappy: false
, keepArrayIndentation: false
, keepFunctionIndentation: false
, maxPreserveNewlines: 10
, preserveNewlines: true
, spaceBeforeConditional: true
, spaceInParen: false
, unescapeStrings: false
, wrapLineLength: 0
, endWithNewline: true
}
}
}
, cssbeautifier: {
files: ["dhtmlx.css"]
}
, watch: {
scripts: {
files: [
'dhx.js', 'dhx.dataDriver.js', 'dhx.REST.js', 'dhx.ui.js', 'dhx.ui.data.js', 'dhx.ui.crud.js', 'dhx.ui.crud.simple.View.js'
, 'dhx.ui.crud.simple.View.Record.js', 'dhx.ui.crud.simple.View.FormWindow.js', 'dhx.ui.crud.simple.View.settings.js', 'latinize.js', 'dhx.MQ.js'
, 'dhx.ui.crud.simple.View.Search.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.socket.js', 'dhx.xml.js', 'dhx.ui.crud.simple.js', 'dhx.ui.i18n.js'
, 'dhx.ui.i18n.pt-br.js', 'dhx.ui.i18n.en-us.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.ui.Application.js', 'dhx.ui.Session.js', 'dhx.ui.desktop.js'
, 'dhx.ui.desktop.settings.js', 'dhx.ui.desktop.view.js', 'dhx.ui.desktop.view.ActiveDesktop.js', 'dhx.ui.desktop.view.TopBar.js'
, 'dhx.ui.desktop.view.SideBar.js', 'shim.js', 'dhx.crypt.js', 'dhx.Encoder.js', 'dhx.shortcut.js', 'dhx.Request.js', 'dhx.cookie.js', 'dhx.dhtmlx.js'
]
, tasks: [
'uglify'
//,'jshint'
]
, options: {
interrupt: true
, }
}
}
, version: {
dhx: {
options: {
prefix: 'version\\s+:\\s+[\'"]'
}
, src: []
}
, dhx_patch: {
options: {
release: 'patch'
}
, src: []
, }
}
, uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
}
, build: {
files: [{
expand: true
, src: [
'dhx.js', 'dhx.dataDriver.js', 'dhx.REST.js', 'dhx.ui.js', 'dhx.ui.data.js', 'dhx.ui.crud.js', 'dhx.ui.crud.simple.View.js'
, 'dhx.ui.crud.simple.View.Record.js', 'dhx.ui.crud.simple.View.FormWindow.js', 'dhx.ui.crud.simple.View.settings.js', 'latinize.js', 'dhx.MQ.js'
, 'dhx.ui.crud.simple.View.Search.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.socket.js', 'dhx.xml.js', 'dhx.ui.crud.simple.js', 'dhx.ui.i18n.js'
, 'dhx.ui.i18n.pt-br.js', 'dhx.ui.i18n.en-us.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.ui.Application.js', 'dhx.ui.Session.js'
, 'dhx.ui.desktop.js', 'dhx.ui.desktop.settings.js', 'dhx.ui.desktop.view.js', 'dhx.ui.desktop.view.ActiveDesktop.js'
, 'dhx.ui.desktop.view.TopBar.js', 'dhx.ui.desktop.view.SideBar.js', 'shim.js', 'dhx.crypt.js', 'dhx.Encoder.js', 'dhx.shortcut.js'
, 'dhx.Request.js', 'dhx.cookie.js', 'dhx.dhtmlx.js' //, 'dhtmlx.js'
]
, dest: 'codebase/', //cwd: 'app/scripts' // <%= pkg.version %>
}]
/*src: [
'dhx.js', 'dhx.dataDriver.js', 'dhx.REST.js', 'dhx.ui.js', 'dhx.ui.data.js', 'dhx.ui.crud.js', 'dhx.ui.crud.simple.View.js', 'dhx.ui.crud.simple.View.Record.js', 'dhx.ui.crud.simple.View.FormWindow.js', 'dhx.ui.crud.simple.View.settings.js', 'latinize.js', 'dhx.MQ.js', 'dhx.ui.crud.simple.View.Search.js', 'dhx.jDBd.js', 'dhx.dataStore.js', 'dhx.socket.js', 'dhx.xml.js'
],
dest: 'build/<%= pkg.name %>.min.js'*/
}
}
//my_src_files: ['foo/*.js', 'bar/*.js'],
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("grunt-jsbeautifier");
grunt.loadNpmTasks('grunt-version');
grunt.loadNpmTasks('grunt-cssbeautifier');
//grunt.loadNpmTasks('grunt-readme');
grunt.registerTask('default', [ /*'readme'*/ , 'uglify']);
};