22
33module . exports = function ( grunt ) {
44 grunt . initConfig ( {
5- concat_sourcemap : {
5+ concat : {
66 options : {
7- sourcesContent : true
7+ sourceMap : true
88 } ,
9- target : {
10- files : {
11- 'dist/jsoneditor.js' : [
12-
13- // License & version info, start the containing closure
14- 'src/intro.js' ,
15-
16- // Simple inheritance
17- 'src/class.js' ,
18- // IE9 polyfills
19- 'src/ie9.js' ,
20- // Utils like extend, each, and trigger
21- 'src/utilities.js' ,
22-
23- // The main JSONEditor class
24- 'src/core.js' ,
25-
26- // JSON Schema validator
27- 'src/validator.js' ,
28-
29- // All the editors
30- 'src/editor.js' ,
31- 'src/editors/null.js' ,
32- 'src/editors/string.js' ,
33- 'src/editors/number.js' ,
34- 'src/editors/integer.js' ,
35- 'src/editors/object.js' ,
36- 'src/editors/array.js' ,
37- 'src/editors/table.js' ,
38- 'src/editors/multiple.js' ,
39- 'src/editors/enum.js' ,
40- 'src/editors/select.js' ,
41- 'src/editors/selectize.js' ,
42- 'src/editors/multiselect.js' ,
43- 'src/editors/base64.js' ,
44- 'src/editors/upload.js' ,
45- 'src/editors/checkbox.js' ,
46- 'src/editors/array/selectize.js' ,
47-
48- // All the themes and iconlibs
49- 'src/theme.js' ,
50- 'src/themes/*.js' ,
51- 'src/iconlib.js' ,
52- 'src/iconlibs/*.js' ,
53-
54- // The JS templating engines
55- 'src/templates/*.js' ,
56-
57- // Set the defaults
58- 'src/defaults.js' ,
59-
60- // Wrapper for $.fn style initialization
61- 'src/jquery.js' ,
62-
63- // End the closure
64- 'src/outro.js'
65- ] ,
66- }
9+ dist : {
10+ dest : 'dist/jsoneditor.js' ,
11+ src : [
12+ // License & version info, start the containing closure
13+ 'src/intro.js' ,
14+
15+ // Simple inheritance
16+ 'src/class.js' ,
17+ // IE9 polyfills
18+ 'src/ie9.js' ,
19+ // Utils like extend, each, and trigger
20+ 'src/utilities.js' ,
21+
22+ // The main JSONEditor class
23+ 'src/core.js' ,
24+
25+ // JSON Schema validator
26+ 'src/validator.js' ,
27+
28+ // All the editors
29+ 'src/editor.js' ,
30+ 'src/editors/null.js' ,
31+ 'src/editors/string.js' ,
32+ 'src/editors/number.js' ,
33+ 'src/editors/integer.js' ,
34+ 'src/editors/object.js' ,
35+ 'src/editors/array.js' ,
36+ 'src/editors/table.js' ,
37+ 'src/editors/multiple.js' ,
38+ 'src/editors/enum.js' ,
39+ 'src/editors/select.js' ,
40+ 'src/editors/selectize.js' ,
41+ 'src/editors/multiselect.js' ,
42+ 'src/editors/base64.js' ,
43+ 'src/editors/upload.js' ,
44+ 'src/editors/checkbox.js' ,
45+ 'src/editors/array/selectize.js' ,
46+
47+ // All the themes and iconlibs
48+ 'src/theme.js' ,
49+ 'src/themes/*.js' ,
50+ 'src/iconlib.js' ,
51+ 'src/iconlibs/*.js' ,
52+
53+ // The JS templating engines
54+ 'src/templates/*.js' ,
55+
56+ // Set the defaults
57+ 'src/defaults.js' ,
58+
59+ // Wrapper for $.fn style initialization
60+ 'src/jquery.js' ,
61+
62+ // End the closure
63+ 'src/outro.js'
64+ ] ,
6765 }
6866 } ,
6967 uglify : {
@@ -72,13 +70,14 @@ module.exports = function(grunt) {
7270 dest : 'dist/jsoneditor.min.js'
7371 } ,
7472 options : {
75- preserveComments : 'some'
73+ preserveComments : 'some' ,
74+ sourceMap : true
7675 }
7776 } ,
7877 watch : {
7978 scripts : {
8079 files : [ "src/**/*.js" ] ,
81- tasks : [ "concat_sourcemap " ]
80+ tasks : [ "concat " ]
8281 }
8382 } ,
8483 jshint : {
@@ -137,9 +136,9 @@ module.exports = function(grunt) {
137136 grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
138137 grunt . loadNpmTasks ( 'grunt-contrib-watch' ) ;
139138 grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
140- grunt . loadNpmTasks ( 'grunt-concat-sourcemap ' ) ;
139+ grunt . loadNpmTasks ( 'grunt-contrib-concat ' ) ;
141140
142141 // Default task.
143- grunt . registerTask ( 'default' , [ 'jshint:beforeconcat' , 'concat_sourcemap ' , 'jshint:afterconcat' , 'uglify' ] ) ;
142+ grunt . registerTask ( 'default' , [ 'jshint:beforeconcat' , 'concat ' , 'jshint:afterconcat' , 'uglify' ] ) ;
144143
145144} ;
0 commit comments