Skip to content

Commit fe81013

Browse files
committed
Add jshint to grunt build process.
Remove CustomEvents check in utilities. Fixes #131 Add support for SCEditor initialization options. Bug fix in Class implementation checking for function toString support.
1 parent b599c8d commit fe81013

25 files changed

+334
-169
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/* merge=own

Gruntfile.js

+39-1
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,53 @@ module.exports = function(grunt) {
7070
files: ["src/**/*.js"],
7171
tasks: ["concat"]
7272
}
73+
},
74+
jshint: {
75+
beforeconcat: [
76+
'src/class.js',
77+
'src/ie9.js',
78+
79+
// Utils like extend, each, and trigger
80+
'src/utilities.js',
81+
82+
// The main JSONEditor class
83+
'src/core.js',
84+
85+
// JSON Schema validator
86+
'src/validator.js',
87+
88+
// All the editors
89+
'src/editor.js',
90+
'src/editors/*.js',
91+
92+
// All the themes and iconlibs
93+
'src/theme.js',
94+
'src/themes/*.js',
95+
'src/iconlib.js',
96+
'src/iconlibs/*.js',
97+
98+
// The JS templating engines
99+
'src/templates/*.js',
100+
101+
// Set the defaults
102+
'src/defaults.js',
103+
104+
// Wrapper for $.fn style initialization
105+
'src/jquery.js'
106+
],
107+
afterconcat: [
108+
'dist/jsoneditor.js'
109+
]
73110
}
74111
});
75112

76113
// These plugins provide necessary tasks.
77114
grunt.loadNpmTasks('grunt-contrib-concat');
78115
grunt.loadNpmTasks('grunt-contrib-uglify');
79116
grunt.loadNpmTasks('grunt-contrib-watch');
117+
grunt.loadNpmTasks('grunt-contrib-jshint');
80118

81119
// Default task.
82-
grunt.registerTask('default', ['concat', 'uglify']);
120+
grunt.registerTask('default', ['jshint:beforeconcat','concat','jshint:afterconcat','uglify']);
83121

84122
};

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-editor",
3-
"version": "0.6.11",
3+
"version": "0.6.12",
44
"authors": [
55
"Jeremy Dorn <[email protected]>"
66
],

0 commit comments

Comments
 (0)