grunt jshint 설정 변경

This commit is contained in:
bnu 2015-02-24 19:16:34 +09:00
parent 46863a8a47
commit 080bbcb0f7
5 changed files with 17 additions and 16 deletions

View file

@ -160,11 +160,6 @@ module.exports = function(grunt) {
files: [ files: [
'Gruntfile.js', 'Gruntfile.js',
'common/js/*.js', 'common/js/*.js',
'!common/js/html5.js',
'!common/js/jquery.js',
'!common/js/x.js',
'!common/js/xe.js',
'!common/js/modernizr.js',
'modules/admin/tpl/js/*.js', 'modules/admin/tpl/js/*.js',
'modules/board/tpl/js/*.js', 'modules/board/tpl/js/*.js',
'modules/editor/tpl/js/*.js', 'modules/editor/tpl/js/*.js',
@ -175,9 +170,15 @@ module.exports = function(grunt) {
ignores : [ ignores : [
'**/jquery*.js', '**/jquery*.js',
'**/swfupload.js', '**/swfupload.js',
'**/*.min.js', '**/**.min.js',
'**/*-packed.js', '**/*-packed.js',
'**/*.compressed.js' '**/*.compressed.js',
'**/jquery-*.js',
'**/jquery.*.js',
'common/js/html5.js',
'common/js/x.js',
'common/js/xe.js',
'common/js/modernizr.js',
] ]
} }
}, },

View file

@ -1,4 +1,5 @@
(function($){ (function($){
"use strict";
var App = window.xe.getApp('xeEditorApp')[0]; var App = window.xe.getApp('xeEditorApp')[0];
var CK = window.CKEDITOR; var CK = window.CKEDITOR;

View file

@ -797,6 +797,7 @@ jQuery(function($){
}); });
if(typeof console == 'undefined'){ if(typeof console == 'undefined'){
/* jshint -W020 */
console={log:function(){}}; console={log:function(){}};
} }

View file

@ -26,6 +26,7 @@
<script> <script>
(function($){ (function($){
"use strict";
var editor_primary_key_name = '{$editor_primary_key_name}'; var editor_primary_key_name = '{$editor_primary_key_name}';
var editor_content_key_name = '{$editor_content_key_name}'; var editor_content_key_name = '{$editor_content_key_name}';

View file

@ -1,22 +1,20 @@
(function($){ (function($){
var xeEditorApp = xe.createApp('xeEditorApp', { "use strict";
init : function() { var XeEditorApp = xe.createApp('xeEditorApp', {
console.log('INIT @ xeEditorApp') init : function() {
}, },
API_ONREADY : function() { API_ONREADY : function() {
console.log('ONREADY @ xeEditorApp');
}, },
getContent : function(seq) { getContent : function(seq) {
this.cast('GET_CONTENT'); this.cast('GET_CONTENT');
}, },
API_EDITOR_CREATED : function(){ API_EDITOR_CREATED : function(){
console.log('APP @ API_EDITOR_CREATED');
}, },
}); });
// Shortcut function in jQuery // Shortcut function in jQuery
$.fn.xeEditorApp = function(opts) { $.fn.xeEditorApp = function(opts) {
var u = new xeEditorApp(this.eq(0), opts); var u = new XeEditorApp(this.eq(0), opts);
if(u) xe.registerApp(u); if(u) xe.registerApp(u);
return u; return u;
@ -24,12 +22,11 @@
// Shortcut function in XE // Shortcut function in XE
window.xe.createXeEditor = function() { window.xe.createXeEditor = function() {
var u = new xeEditorApp(); var u = new XeEditorApp();
// if(u) xe.registerApp(u);
return u; return u;
}; };
var u = new xeEditorApp(); var u = new XeEditorApp();
xe.registerApp(u); xe.registerApp(u);
})(jQuery); })(jQuery);