diff --git a/src/Yavsc/jsconfig.json b/src/Yavsc/jsconfig.json index 6b1c08b4..a1fb64b0 100644 --- a/src/Yavsc/jsconfig.json +++ b/src/Yavsc/jsconfig.json @@ -2,14 +2,17 @@ // See http://go.microsoft.com/fwlink/?LinkId=759670 // for the documentation about the jsconfig.json format "compilerOptions": { + "module": "commonjs", "target": "es6" }, + "include": [ + "wwwroot/js/**/*" + ], "exclude": [ "bin", "src", "Resources", "Properties", - "wwwroot", "contrib", "node_modules", "bower_components", diff --git a/src/Yavsc/project.json b/src/Yavsc/project.json index a16a3030..9b3d00a9 100644 --- a/src/Yavsc/project.json +++ b/src/Yavsc/project.json @@ -75,7 +75,7 @@ "defaultNamespace": "Yavsc" }, "dependencies": { - "MarkdownDeep-av.NET": "1.5.26", + "MarkdownDeep-av.NET": "1.5.27", "EntityFramework.Commands": "7.0.0-rc1-final", "EntityFramework.Core": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", @@ -165,7 +165,7 @@ "frameworks": { "dnx451": { "frameworkAssemblies": { - "System.Drawing": "4.0.0.0", + "System.Drawing": "4.0.0", "System.Net": "4.0.0.0", "System.Xml": "4.0.0.0", "System": "4.0.0.0" diff --git a/src/Yavsc/wwwroot/js/audiovideoinput.js b/src/Yavsc/wwwroot/js/audiovideoinput.js index 7013835e..e58e8751 100644 --- a/src/Yavsc/wwwroot/js/audiovideoinput.js +++ b/src/Yavsc/wwwroot/js/audiovideoinput.js @@ -1,3 +1,4 @@ +//@ts.check var constraints = { audio: true, video: false } @@ -10,4 +11,4 @@ navigator.mediaDevices.getUserMedia(constraints) .catch(function(err) { /* handle the error */ console.log(err) - }); \ No newline at end of file + }); diff --git a/src/Yavsc/wwwroot/js/google-geoloc.js b/src/Yavsc/wwwroot/js/google-geoloc.js index 6498842c..36e4bef4 100644 --- a/src/Yavsc/wwwroot/js/google-geoloc.js +++ b/src/Yavsc/wwwroot/js/google-geoloc.js @@ -1,3 +1,5 @@ +//@ts-check + if (typeof jQuery === 'undefined') { throw new Error('This Google maps client script requires jQuery') } diff --git a/src/Yavsc/wwwroot/js/to-markdown.js b/src/Yavsc/wwwroot/js/to-markdown.js index b81025ed..fe57a944 100644 --- a/src/Yavsc/wwwroot/js/to-markdown.js +++ b/src/Yavsc/wwwroot/js/to-markdown.js @@ -1,3 +1,5 @@ +//@ts-check + (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toMarkdown = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<",">"+t+"<")},t.exports=a},{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":7}],2:[function(e,t,n){"use strict";function c(e,t){var n=" ";return 0===Array.prototype.indexOf.call(t.parentNode.childNodes,t)&&(n="| "),n+e+" |"}var r=/highlight highlight-(\S+)/;t.exports=[{filter:"br",replacement:function(){return"\n"}},{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}},{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}},{filter:["th","td"],replacement:function(e,t){return c(e,t)}},{filter:"tr",replacement:function(e,t){var n="",r={left:":--",right:"--:",center:":-:"};if("THEAD"===t.parentNode.nodeName)for(var o=0;o "))+"\n\n"}},{filter:"li",replacement:function(e,t){e=e.replace(/^\s+/,"").replace(/\n/gm,"\n ");var n=t.parentNode,r=Array.prototype.indexOf.call(n.children,t)+1;return(/ol/i.test(n.nodeName)?r+". ":"* ")+e}},{filter:["ul","ol"],replacement:function(e,t){for(var n=[],r=0;r0){elem=inqueue.shift() +outqueue.push(elem) +children=elem.childNodes +for(i=0;i<','>'+content+'<')} +function canConvert(node,filter){if(typeof filter==='string'){return filter===node.nodeName.toLowerCase()} +if(Array.isArray(filter)){return filter.indexOf(node.nodeName.toLowerCase())!==-1}else if(typeof filter==='function'){return filter.call(toMarkdown,node)}else{throw new TypeError('`filter` needs to be a string, array, or function')}} +function isFlankedByWhitespace(side,node){var sibling +var regExp +var isFlanked +if(side==='left'){sibling=node.previousSibling +regExp=/ $/}else{sibling=node.nextSibling +regExp=/^ /} +if(sibling){if(sibling.nodeType===3){isFlanked=regExp.test(sibling.nodeValue)}else if(sibling.nodeType===1&&!isBlock(sibling)){isFlanked=regExp.test(sibling.textContent)}} +return isFlanked} +function flankingWhitespace(node,content){var leading='' +var trailing='' +if(!isBlock(node)){var hasLeading=/^[ \r\n\t]/.test(content) +var hasTrailing=/[ \r\n\t]$/.test(content) +if(hasLeading&&!isFlankedByWhitespace('left',node)){leading=' '} +if(hasTrailing&&!isFlankedByWhitespace('right',node)){trailing=' '}} +return{leading:leading,trailing:trailing}} +function process(node){var replacement +var content=getContent(node) +if(!isVoid(node)&&!/A|TH|TD/.test(node.nodeName)&&/^\s*$/i.test(content)){node._replacement='' +return} +for(var i=0;i=0;i--){process(nodes[i])} +output=getContent(clone) +return output.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g,'').replace(/\n\s+\n/g,'\n\n').replace(/\n{3,}/g,'\n\n')} +toMarkdown.isBlock=isBlock +toMarkdown.isVoid=isVoid +toMarkdown.outer=outer +module.exports=toMarkdown},{"./lib/gfm-converters":2,"./lib/html-parser":3,"./lib/md-converters":4,"collapse-whitespace":7}],2:[function(require,module,exports){'use strict' +function cell(content,node){var index=Array.prototype.indexOf.call(node.parentNode.childNodes,node) +var prefix=' ' +if(index===0)prefix='| ' +return prefix+content+' |'} +var highlightRegEx=/highlight highlight-(\S+)/module.exports=[{filter:'br',replacement:function(){return'\n'}},{filter:['del','s','strike'],replacement:function(content){return'~~'+content+'~~'}},{filter:function(node){return node.type==='checkbox'&&node.parentNode.nodeName==='LI'},replacement:function(content,node){return(node.checked?'[x]':'[ ]')+' '}},{filter:['th','td'],replacement:function(content,node){return cell(content,node)}},{filter:'tr',replacement:function(content,node){var borderCells='' +var alignMap={left:':--',right:'--:',center:':-:'} +if(node.parentNode.nodeName==='THEAD'){for(var i=0;i ') +return'\n\n'+content+'\n\n'}},{filter:'li',replacement:function(content,node){content=content.replace(/^\s+/,'').replace(/\n/gm,'\n ') +var prefix='* ' +var parent=node.parentNode +var index=Array.prototype.indexOf.call(parent.children,node)+1 +prefix=/ol/i.test(parent.nodeName)?index+'. ':'* ' +return prefix+content}},{filter:['ul','ol'],replacement:function(content,node){var strings=[] +for(var i=0;i, IDisposable { - - ApplicationDbContext _dbContext; + readonly ApplicationDbContext _dbContext; ServerSideFixture _fixture; public BatchTests(ITestOutputHelper output, ServerSideFixture fixture) : base (output, fixture) diff --git a/src/test/WIP/NotWorking.cs b/src/test/WIP/NotWorking.cs index 01f9e08c..59c05713 100644 --- a/src/test/WIP/NotWorking.cs +++ b/src/test/WIP/NotWorking.cs @@ -17,8 +17,8 @@ namespace test [Trait("regres", "yes")] public class NotWorking : BaseTestContext { - SourceInformationProvider _sourceInfoProvider; - IOptions _localizationOptions; + readonly SourceInformationProvider _sourceInfoProvider; + readonly IOptions _localizationOptions; public NotWorking( IHostingEnvironment env , IOptions siteSettings, SourceInformationProvider sourceInfoProvider, IOptions localizationOptions,