Skip to content

Commit

Permalink
Update grunt, add reference meta schema, preliminary anyOf support, j…
Browse files Browse the repository at this point in the history
…shint fixes
  • Loading branch information
jdorn committed Jul 4, 2016
1 parent 36317ff commit 76c8a58
Show file tree
Hide file tree
Showing 9 changed files with 780 additions and 88 deletions.
127 changes: 63 additions & 64 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,66 @@

module.exports = function(grunt) {
grunt.initConfig({
concat_sourcemap: {
concat: {
options: {
sourcesContent: true
sourceMap: true
},
target: {
files: {
'dist/jsoneditor.js': [

// License & version info, start the containing closure
'src/intro.js',

// Simple inheritance
'src/class.js',
// IE9 polyfills
'src/ie9.js',
// Utils like extend, each, and trigger
'src/utilities.js',

// The main JSONEditor class
'src/core.js',

// JSON Schema validator
'src/validator.js',

// All the editors
'src/editor.js',
'src/editors/null.js',
'src/editors/string.js',
'src/editors/number.js',
'src/editors/integer.js',
'src/editors/object.js',
'src/editors/array.js',
'src/editors/table.js',
'src/editors/multiple.js',
'src/editors/enum.js',
'src/editors/select.js',
'src/editors/selectize.js',
'src/editors/multiselect.js',
'src/editors/base64.js',
'src/editors/upload.js',
'src/editors/checkbox.js',
'src/editors/array/selectize.js',

// All the themes and iconlibs
'src/theme.js',
'src/themes/*.js',
'src/iconlib.js',
'src/iconlibs/*.js',

// The JS templating engines
'src/templates/*.js',

// Set the defaults
'src/defaults.js',

// Wrapper for $.fn style initialization
'src/jquery.js',

// End the closure
'src/outro.js'
],
}
dist: {
dest: 'dist/jsoneditor.js',
src: [
// License & version info, start the containing closure
'src/intro.js',

// Simple inheritance
'src/class.js',
// IE9 polyfills
'src/ie9.js',
// Utils like extend, each, and trigger
'src/utilities.js',

// The main JSONEditor class
'src/core.js',

// JSON Schema validator
'src/validator.js',

// All the editors
'src/editor.js',
'src/editors/null.js',
'src/editors/string.js',
'src/editors/number.js',
'src/editors/integer.js',
'src/editors/object.js',
'src/editors/array.js',
'src/editors/table.js',
'src/editors/multiple.js',
'src/editors/enum.js',
'src/editors/select.js',
'src/editors/selectize.js',
'src/editors/multiselect.js',
'src/editors/base64.js',
'src/editors/upload.js',
'src/editors/checkbox.js',
'src/editors/array/selectize.js',

// All the themes and iconlibs
'src/theme.js',
'src/themes/*.js',
'src/iconlib.js',
'src/iconlibs/*.js',

// The JS templating engines
'src/templates/*.js',

// Set the defaults
'src/defaults.js',

// Wrapper for $.fn style initialization
'src/jquery.js',

// End the closure
'src/outro.js'
],
}
},
uglify: {
Expand All @@ -72,13 +70,14 @@ module.exports = function(grunt) {
dest: 'dist/jsoneditor.min.js'
},
options: {
preserveComments: 'some'
preserveComments: 'some',
sourceMap: true
}
},
watch: {
scripts: {
files: ["src/**/*.js"],
tasks: ["concat_sourcemap"]
tasks: ["concat"]
}
},
jshint: {
Expand Down Expand Up @@ -137,9 +136,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-concat-sourcemap');
grunt.loadNpmTasks('grunt-contrib-concat');

// Default task.
grunt.registerTask('default', ['jshint:beforeconcat','concat_sourcemap','jshint:afterconcat','uglify']);
grunt.registerTask('default', ['jshint:beforeconcat','concat','jshint:afterconcat','uglify']);

};
Loading

0 comments on commit 76c8a58

Please sign in to comment.