0&&y(s,!l&&x(t,"script")),a},buildFragment:function(t,e,i,n){for(var o,r,s,a,l,h,c=e.createDocumentFragment(),u=[],d=0,p=t.length;d$2>")+a[2],h=a[0];h--;)r=r.lastChild;nt.merge(u,r.childNodes),r=c.firstChild,r.textContent=""}else u.push(e.createTextNode(o));for(c.textContent="",d=0;o=u[d++];)if((!n||nt.inArray(o,n)===-1)&&(l=nt.contains(o.ownerDocument,o),r=x(c.appendChild(o),"script"),l&&y(r),i))for(h=0;o=r[h++];)Ot.test(o.type||"")&&i.push(o);return c},cleanData:function(t){for(var e,i,n,o,r=nt.event.special,s=0;void 0!==(i=t[s]);s++){if(nt.acceptData(i)&&(o=i[xt.expando],o&&(e=xt.cache[o]))){if(e.events)for(n in e.events)r[n]?nt.event.remove(i,n):nt.removeEvent(i,n,e.handle);xt.cache[o]&&delete xt.cache[o]}delete At.cache[i[At.expando]]}}}),nt.fn.extend({text:function(t){return wt(this,function(t){return void 0===t?nt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=m(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=m(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?nt.filter(t,this):this,o=0;null!=(i=n[o]);o++)e||1!==i.nodeType||nt.cleanData(x(i)),i.parentNode&&(e&&nt.contains(i.ownerDocument,i)&&y(x(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(nt.cleanData(x(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return nt.clone(this,t,e)})},html:function(t){return wt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!zt.test(t)&&!Ht[(Rt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace($t,"<$1>$2>");try{for(;i1&&"string"==typeof d&&!tt.checkClone&&Nt.test(d))return this.each(function(i){var n=c.eq(i);p&&(t[0]=d.call(this,i,n.html())),n.domManip(t,e)});if(h&&(i=nt.buildFragment(t,this[0].ownerDocument,!1,this),n=i.firstChild,1===i.childNodes.length&&(i=n),n)){for(o=nt.map(x(i,"script"),v),r=o.length;l1)},show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ft(this)?nt(this).show():nt(this).hide()})}}),nt.Tween=B,B.prototype={constructor:B,init:function(t,e,i,n,o,r){this.elem=t,this.prop=i,this.easing=o||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=r||(nt.cssNumber[i]?"":"px")},cur:function(){var t=B.propHooks[this.prop];return t&&t.get?t.get(this):B.propHooks._default.get(this)},run:function(t){var e,i=B.propHooks[this.prop];return this.options.duration?this.pos=e=nt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=nt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){nt.fx.step[t.prop]?nt.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[nt.cssProps[t.prop]]||nt.cssHooks[t.prop])?nt.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},nt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},nt.fx=B.prototype.init,nt.fx.step={};var te,ee,ie=/^(?:toggle|show|hide)$/,ne=new RegExp("^(?:([+-])=|)("+Et+")([a-z%]*)$","i"),oe=/queueHooks$/,re=[I],se={"*":[function(t,e){var i=this.createTween(t,e),n=i.cur(),o=ne.exec(e),r=o&&o[3]||(nt.cssNumber[t]?"":"px"),s=(nt.cssNumber[t]||"px"!==r&&+n)&&ne.exec(nt.css(i.elem,t)),a=1,l=20;if(s&&s[3]!==r){r=r||s[3],o=o||[],s=+n||1;do a=a||".5",s/=a,nt.style(i.elem,t,s+r);while(a!==(a=i.cur()/n)&&1!==a&&--l)}return o&&(s=i.start=+s||+n||0,i.unit=r,i.end=o[1]?s+(o[1]+1)*o[2]:+o[2]),i}]};nt.Animation=nt.extend(N,{tweener:function(t,e){nt.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,o=t.length;n1)},removeAttr:function(t){return this.each(function(){nt.removeAttr(this,t)})}}),nt.extend({attr:function(t,e,i){var n,o,r=t.nodeType;if(t&&3!==r&&8!==r&&2!==r)return typeof t.getAttribute===St?nt.prop(t,e,i):(1===r&&nt.isXMLDoc(t)||(e=e.toLowerCase(),n=nt.attrHooks[e]||(nt.expr.match.bool.test(e)?le:ae)),void 0===i?n&&"get"in n&&null!==(o=n.get(t,e))?o:(o=nt.find.attr(t,e),null==o?void 0:o):null!==i?n&&"set"in n&&void 0!==(o=n.set(t,i,e))?o:(t.setAttribute(e,i+""),i):void nt.removeAttr(t,e))},removeAttr:function(t,e){var i,n,o=0,r=e&&e.match(vt);if(r&&1===t.nodeType)for(;i=r[o++];)n=nt.propFix[i]||i,nt.expr.match.bool.test(i)&&(t[n]=!1),t.removeAttribute(i)},attrHooks:{type:{set:function(t,e){if(!tt.radioValue&&"radio"===e&&nt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}}}),le={set:function(t,e,i){return e===!1?nt.removeAttr(t,i):t.setAttribute(i,i),i}},nt.each(nt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=he[e]||nt.find.attr;he[e]=function(t,e,n){var o,r;return n||(r=he[e],he[e]=o,o=null!=i(t,e,n)?e.toLowerCase():null,he[e]=r),o}});var ce=/^(?:input|select|textarea|button)$/i;nt.fn.extend({prop:function(t,e){return wt(this,nt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[nt.propFix[t]||t]})}}),nt.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,i){var n,o,r,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return r=1!==s||!nt.isXMLDoc(t),r&&(e=nt.propFix[e]||e,o=nt.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||ce.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),tt.optSelected||(nt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),nt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){nt.propFix[this.toLowerCase()]=this});var ue=/[\t\r\n\f]/g;nt.fn.extend({addClass:function(t){var e,i,n,o,r,s,a="string"==typeof t&&t,l=0,h=this.length;if(nt.isFunction(t))return this.each(function(e){nt(this).addClass(t.call(this,e,this.className))});if(a)for(e=(t||"").match(vt)||[];l=0;)n=n.replace(" "+o+" "," ");s=t?nt.trim(n):"",i.className!==s&&(i.className=s)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):nt.isFunction(t)?this.each(function(i){nt(this).toggleClass(t.call(this,i,this.className,e),e)}):this.each(function(){if("string"===i)for(var e,n=0,o=nt(this),r=t.match(vt)||[];e=r[n++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else i!==St&&"boolean"!==i||(this.className&&xt.set(this,"__className__",this.className),this.className=this.className||t===!1?"":xt.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;i=0)return!0;return!1}});var de=/\r/g;nt.fn.extend({val:function(t){var e,i,n,o=this[0];{if(arguments.length)return n=nt.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=n?t.call(this,i,nt(this).val()):t,null==o?o="":"number"==typeof o?o+="":nt.isArray(o)&&(o=nt.map(o,function(t){return null==t?"":t+""})),e=nt.valHooks[this.type]||nt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return e=nt.valHooks[o.type]||nt.valHooks[o.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:(i=o.value,"string"==typeof i?i.replace(de,""):null==i?"":i)}}}),nt.extend({valHooks:{option:{get:function(t){var e=nt.find.attr(t,"value");return null!=e?e:nt.trim(nt.text(t))}},select:{get:function(t){for(var e,i,n=t.options,o=t.selectedIndex,r="select-one"===t.type||o<0,s=r?null:[],a=r?o+1:n.length,l=o<0?a:r?o:0;l=0)&&(i=!0);return i||(t.selectedIndex=-1),r}}}}),nt.each(["radio","checkbox"],function(){nt.valHooks[this]={set:function(t,e){if(nt.isArray(e))return t.checked=nt.inArray(nt(t).val(),e)>=0}},tt.checkOn||(nt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),nt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){nt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),nt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}});var pe=nt.now(),fe=/\?/;nt.parseJSON=function(t){return JSON.parse(t+"")},nt.parseXML=function(t){var e,i;if(!t||"string"!=typeof t)return null;try{i=new DOMParser,e=i.parseFromString(t,"text/xml")}catch(n){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||nt.error("Invalid XML: "+t),e};var ge=/#.*$/,me=/([?&])_=[^&]*/,ve=/^(.*?):[ \t]*([^\r\n]*)$/gm,be=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ye=/^(?:GET|HEAD)$/,we=/^\/\//,xe=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ae={},_e={},Ce="*/".concat("*"),Ee=i.location.href,ke=xe.exec(Ee.toLowerCase())||[];nt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ee,type:"GET",isLocal:be.test(ke[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ce,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":nt.parseJSON,"text xml":nt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?W(W(t,nt.ajaxSettings),e):W(nt.ajaxSettings,t)},ajaxPrefilter:O(Ae),ajaxTransport:O(_e),ajax:function(t,e){function i(t,e,i,s){var l,c,v,b,w,A=e;2!==y&&(y=2,a&&clearTimeout(a),n=void 0,r=s||"",x.readyState=t>0?4:0,l=t>=200&&t<300||304===t,i&&(b=H(u,x,i)),b=U(u,b,x,l),l?(u.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(nt.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(nt.etag[o]=w)),204===t||"HEAD"===u.type?A="nocontent":304===t?A="notmodified":(A=b.state,c=b.data,v=b.error,l=!v)):(v=A,!t&&A||(A="error",t<0&&(t=0))),x.status=t,x.statusText=(e||A)+"",l?f.resolveWith(d,[c,A,x]):f.rejectWith(d,[x,A,v]),x.statusCode(m),m=void 0,h&&p.trigger(l?"ajaxSuccess":"ajaxError",[x,u,l?c:v]),g.fireWith(d,[x,A]),h&&(p.trigger("ajaxComplete",[x,u]),--nt.active||nt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o,r,s,a,l,h,c,u=nt.ajaxSetup({},e),d=u.context||u,p=u.context&&(d.nodeType||d.jquery)?nt(d):nt.event,f=nt.Deferred(),g=nt.Callbacks("once memory"),m=u.statusCode||{},v={},b={},y=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===y){if(!s)for(s={};e=ve.exec(r);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===y?r:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return y||(t=b[i]=b[i]||t,v[t]=e),this},overrideMimeType:function(t){return y||(u.mimeType=t),this},statusCode:function(t){var e;if(t)if(y<2)for(e in t)m[e]=[m[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return n&&n.abort(e),i(0,e),this}};if(f.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,u.url=((t||u.url||Ee)+"").replace(ge,"").replace(we,ke[1]+"//"),u.type=e.method||e.type||u.method||u.type,u.dataTypes=nt.trim(u.dataType||"*").toLowerCase().match(vt)||[""],null==u.crossDomain&&(l=xe.exec(u.url.toLowerCase()),u.crossDomain=!(!l||l[1]===ke[1]&&l[2]===ke[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(ke[3]||("http:"===ke[1]?"80":"443")))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=nt.param(u.data,u.traditional)),P(Ae,u,e,x),2===y)return x;h=nt.event&&u.global,h&&0===nt.active++&&nt.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!ye.test(u.type),o=u.url,u.hasContent||(u.data&&(o=u.url+=(fe.test(o)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=me.test(o)?o.replace(me,"$1_="+pe++):o+(fe.test(o)?"&":"?")+"_="+pe++)),u.ifModified&&(nt.lastModified[o]&&x.setRequestHeader("If-Modified-Since",nt.lastModified[o]),nt.etag[o]&&x.setRequestHeader("If-None-Match",nt.etag[o])),(u.data&&u.hasContent&&u.contentType!==!1||e.contentType)&&x.setRequestHeader("Content-Type",u.contentType),x.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+Ce+"; q=0.01":""):u.accepts["*"]);for(c in u.headers)x.setRequestHeader(c,u.headers[c]);if(u.beforeSend&&(u.beforeSend.call(d,x,u)===!1||2===y))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](u[c]);if(n=P(_e,u,e,x)){x.readyState=1,h&&p.trigger("ajaxSend",[x,u]),u.async&&u.timeout>0&&(a=setTimeout(function(){x.abort("timeout")},u.timeout));try{y=1,n.send(v,i)}catch(A){if(!(y<2))throw A;i(-1,A)}}else i(-1,"No Transport");return x},getJSON:function(t,e,i){return nt.get(t,e,i,"json")},getScript:function(t,e){return nt.get(t,void 0,e,"script")}}),nt.each(["get","post"],function(t,e){nt[e]=function(t,i,n,o){return nt.isFunction(i)&&(o=o||n,n=i,i=void 0),nt.ajax({url:t,type:e,dataType:o,data:i,success:n})}}),nt._evalUrl=function(t){return nt.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},nt.fn.extend({wrapAll:function(t){var e;return nt.isFunction(t)?this.each(function(e){nt(this).wrapAll(t.call(this,e))}):(this[0]&&(e=nt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return nt.isFunction(t)?this.each(function(e){nt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=nt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=nt.isFunction(t);return this.each(function(i){nt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){
-nt.nodeName(this,"body")||nt(this).replaceWith(this.childNodes)}).end()}}),nt.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},nt.expr.filters.visible=function(t){return!nt.expr.filters.hidden(t)};var Fe=/%20/g,De=/\[\]$/,Se=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,Te=/^(?:input|select|textarea|keygen)/i;nt.param=function(t,e){var i,n=[],o=function(t,e){e=nt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=nt.ajaxSettings&&nt.ajaxSettings.traditional),nt.isArray(t)||t.jquery&&!nt.isPlainObject(t))nt.each(t,function(){o(this.name,this.value)});else for(i in t)j(i,t[i],e,o);return n.join("&").replace(Fe,"+")},nt.fn.extend({serialize:function(){return nt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=nt.prop(this,"elements");return t?nt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!nt(this).is(":disabled")&&Te.test(this.nodeName)&&!Me.test(t)&&(this.checked||!Dt.test(t))}).map(function(t,e){var i=nt(this).val();return null==i?null:nt.isArray(i)?nt.map(i,function(t){return{name:e.name,value:t.replace(Se,"\r\n")}}):{name:e.name,value:i.replace(Se,"\r\n")}}).get()}}),nt.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Be=0,Le={},$e={0:200,1223:204},Re=nt.ajaxSettings.xhr();i.attachEvent&&i.attachEvent("onunload",function(){for(var t in Le)Le[t]()}),tt.cors=!!Re&&"withCredentials"in Re,tt.ajax=Re=!!Re,nt.ajaxTransport(function(t){var e;if(tt.cors||Re&&!t.crossDomain)return{send:function(i,n){var o,r=t.xhr(),s=++Be;if(r.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)r[o]=t.xhrFields[o];t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)r.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(delete Le[s],e=r.onload=r.onerror=null,"abort"===t?r.abort():"error"===t?n(r.status,r.statusText):n($e[r.status]||r.status,r.statusText,"string"==typeof r.responseText?{text:r.responseText}:void 0,r.getAllResponseHeaders()))}},r.onload=e(),r.onerror=e("error"),e=Le[s]=e("abort");try{r.send(t.hasContent&&t.data||null)}catch(a){if(e)throw a}},abort:function(){e&&e()}}}),nt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return nt.globalEval(t),t}}}),nt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),nt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i;return{send:function(n,o){e=nt("
diff --git a/package.json b/package.json
index 9edd57f0..9e60d723 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,12 @@
"jscs": "^3.0.7",
"jsdoc": "^3.4.0",
"style-loader": "^0.13.1",
+ "ts-loader": "^0.8.2",
+ "tslint": "^3.14.0",
+ "typescript": "^1.8.10",
+ "typings": "^1.3.2",
"url-loader": "^0.5.7",
- "webpack": "^1.13.1"
+ "webpack": "^1.13.1",
+ "webpack-fail-plugin": "^1.0.5"
}
}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..503dfb67
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "compilerOptions": {
+ "target": "es5",
+ "sourceMap": true
+ },
+ "files": [
+ "./typings/index.d.ts",
+ "./nengo_gui/static/webpack.d.ts"
+ ]
+}
diff --git a/typings.json b/typings.json
new file mode 100644
index 00000000..c97279dd
--- /dev/null
+++ b/typings.json
@@ -0,0 +1,10 @@
+{
+ "name": "nengo",
+ "dependencies": {
+ "d3": "registry:npm/d3#3.0.0+20160723033700"
+ },
+ "globalDependencies": {
+ "jquery": "registry:dt/jquery#1.10.0+20160704162008",
+ "interact": "registry:dt/interact#1.0.25+20160613160313"
+ }
+}
diff --git a/webpack.config.js b/webpack.config.js
index 61d04404..8a745539 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -5,7 +5,7 @@ module.exports = {
context: __dirname, // Paths are relative to nengo_gui
// Putting the entry point in a list is a workaround for this error:
// Error: a dependency to an entry point is not allowed
- entry: ['./nengo_gui/static/nengo.js'],
+ entry: ['./nengo_gui/static/nengo.ts'],
output: {
path: './nengo_gui/static/dist',
filename: 'nengo.js',
@@ -14,7 +14,7 @@ module.exports = {
publicPath: '/static/dist/' // Fixes issue finding emitted files
},
resolve: {
- extensions: ['', '.js']
+ extensions: ['', '.js', '.ts']
},
module: {
loaders: [
@@ -28,14 +28,26 @@ module.exports = {
{
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader?name=./[hash].[ext]'
- }
+ },
+ { test: /\.tsx?$/, loader: 'ts-loader' }
]
},
plugins: [
+ require('webpack-fail-plugin'),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
"window.jQuery": 'jquery',
})
- ]
+ ],
+ ts: {
+ ignoreDiagnostics: [
+ "2322",
+ "2339",
+ "2342",
+ "2345",
+ "2346",
+ "2403"
+ ]
+ }
}