typed-dom
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.7 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License (https://opensource.org/licenses/MIT) */ | ||
/*! typed-dom v0.0.8 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License */ | ||
define = typeof define === 'function' && define.amd | ||
@@ -44,4 +44,4 @@ ? define | ||
var raw = factory(); | ||
void Object.keys(attrs).forEach(function (attr) { | ||
return raw.setAttribute(attr, attrs[attr] || ''); | ||
void Object.keys(attrs).forEach(function (name) { | ||
return raw.setAttribute(name, attrs[name] || ''); | ||
}); | ||
@@ -246,3 +246,4 @@ void Object.keys(contents).forEach(function (k) { | ||
'src/export', | ||
'src/export' | ||
'src/export', | ||
'./src/import' | ||
], function (require, exports, export_1, export_2) { | ||
@@ -249,0 +250,0 @@ 'use strict'; |
@@ -1,2 +0,2 @@ | ||
/*! typed-dom v0.0.7 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License (https://opensource.org/licenses/MIT) */ | ||
define="function"==typeof define&&define.amd?define:function(){"use strict";var e="typed-dom",t={};return function r(n,i,o){return o?void o.apply(this,i.map(function(e){switch(e){case"require":return"function"==typeof require?require:void 0;case"exports":return-1===n.indexOf("/")?t[n]="undefined"==typeof exports?self[n]=self[n]||{}:exports:t[n]=t.hasOwnProperty(n)?t[n]:{};default:return".d"===e.slice(-2)&&{}||t.hasOwnProperty(e)&&t[e]||"function"==typeof require&&require(e)||self[e]}})):void r(e,n,i)}}(),define("src/dom/builder",["require","exports"],function(e,t){"use strict";function r(e,t,r){function n(e){var t={};return Object.keys(e).reduce(function(e,r){return t[r]=e[r],Object.defineProperty(e,r,{get:function(){return t[r]},set:function(e){var n=t[r];t[r]=e,i.replaceChild(e.raw,n.raw)}}),e},e)}void 0===t&&(t=[]),void 0===r&&(r={});var i=e();return void Object.keys(r).forEach(function(e){return i.setAttribute(e,r[e]||"")}),void Object.keys(t).forEach(function(e){return void i.appendChild(t[e].raw)}),t=t instanceof Array?Object.freeze(t):n(t),Object.freeze({raw:i,get contents(){return t},set contents(e){t instanceof Array?(e=Object.freeze(e),i.innerHTML="",void e.forEach(function(e){return void i.appendChild(e.raw)})):(void Object.keys(e).forEach(function(r){return void i.replaceChild(e[r].raw,t[r].raw)}),e=n(e)),t=e}})}t.build=r}),define("src/dom/html",["require","exports","src/dom/builder"],function(e,t,r){"use strict";t.TypedHTML=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","datalist","dd","del","dfn","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","map","mark","marquee","menu","meta","nav","nextid","nobr","noframes","noscript","object","ol","optgroup","option","p","param","picture","plaintext","pre","progress","q","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","sup","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","tt","u","ul","var","video","wbr","xmp","custom"].reduce(function(e,t){return e[t]=function(e,n,i){return i||"function"!=typeof n||(i=n),r.build(i||function(){return document.createElement(t)},e,n)},e},{})}),define("src/export",["require","exports","src/dom/html"],function(e,t,r){"use strict";t["default"]=r.TypedHTML}),define("typed-dom",["require","exports","src/export","src/export"],function(e,t,r,n){"use strict";function i(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}i(r),t["default"]=n["default"]}); | ||
/*! typed-dom v0.0.8 https://github.com/falsandtru/typed-dom | (c) 2016, falsandtru | MIT License */ | ||
define="function"==typeof define&&define.amd?define:function(){"use strict";var e="typed-dom",t={};return function r(n,i,o){return o?void o.apply(this,i.map(function(e){switch(e){case"require":return"function"==typeof require?require:void 0;case"exports":return n.indexOf("/")===-1?t[n]="undefined"==typeof exports?self[n]=self[n]||{}:exports:t[n]=t.hasOwnProperty(n)?t[n]:{};default:return".d"===e.slice(-2)&&{}||t.hasOwnProperty(e)&&t[e]||"function"==typeof require&&require(e)||self[e]}})):void r(e,n,i)}}(),define("src/dom/builder",["require","exports"],function(e,t){"use strict";function r(e,t,r){function n(e){var t={};return Object.keys(e).reduce(function(e,r){return t[r]=e[r],Object.defineProperty(e,r,{get:function(){return t[r]},set:function(e){var n=t[r];t[r]=e,i.replaceChild(e.raw,n.raw)}}),e},e)}void 0===t&&(t=[]),void 0===r&&(r={});var i=e();return void Object.keys(r).forEach(function(e){return i.setAttribute(e,r[e]||"")}),void Object.keys(t).forEach(function(e){return void i.appendChild(t[e].raw)}),t=t instanceof Array?Object.freeze(t):n(t),Object.freeze({raw:i,get contents(){return t},set contents(e){t instanceof Array?(e=Object.freeze(e),i.innerHTML="",void e.forEach(function(e){return void i.appendChild(e.raw)})):(void Object.keys(e).forEach(function(r){return void i.replaceChild(e[r].raw,t[r].raw)}),e=n(e)),t=e}})}t.build=r}),define("src/dom/html",["require","exports","src/dom/builder"],function(e,t,r){"use strict";t.TypedHTML=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","datalist","dd","del","dfn","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","map","mark","marquee","menu","meta","nav","nextid","nobr","noframes","noscript","object","ol","optgroup","option","p","param","picture","plaintext","pre","progress","q","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","sup","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","tt","u","ul","var","video","wbr","xmp","custom"].reduce(function(e,t){return e[t]=function(e,n,i){return i||"function"!=typeof n||(i=n),r.build(i||function(){return document.createElement(t)},e,n)},e},{})}),define("src/export",["require","exports","src/dom/html"],function(e,t,r){"use strict";t.default=r.TypedHTML}),define("typed-dom",["require","exports","src/export","src/export","./src/import"],function(e,t,r,n){"use strict";function i(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}i(r),t.default=n.default}); |
@@ -18,3 +18,2 @@ const gulp = require('gulp'); | ||
src: [ | ||
'typings/*.d.ts', | ||
'*.ts' | ||
@@ -26,3 +25,2 @@ ], | ||
src: [ | ||
'typings/*.d.ts', | ||
'*.ts', | ||
@@ -36,3 +34,3 @@ 'src/**/*.ts', | ||
banner: [ | ||
`/*! ${pkg.name} v${pkg.version} ${pkg.repository.url} | (c) 2016, ${pkg.author} | ${pkg.license.type} License (${pkg.license.url}) */`, | ||
`/*! ${pkg.name} v${pkg.version} ${pkg.repository.url} | (c) 2016, ${pkg.author} | ${pkg.license} License */`, | ||
'' | ||
@@ -105,2 +103,3 @@ ].join('\n'), | ||
configFile: __dirname + '/karma.conf.js', | ||
browsers: ['Chrome', 'Firefox'], | ||
preprocessors: { | ||
@@ -115,3 +114,3 @@ 'dist/*.js': ['espower'] | ||
configFile: __dirname + '/karma.conf.js', | ||
browsers: ['Chrome', 'Firefox', 'IE11'], | ||
browsers: ['Chrome', 'Firefox'], | ||
reporters: ['dots', 'coverage'], | ||
@@ -129,3 +128,3 @@ preprocessors: { | ||
browsers: ['Chrome', 'Firefox'], | ||
reporters: ['dots', 'coverage'], | ||
reporters: ['dots', 'coverage', 'coveralls'], | ||
preprocessors: { | ||
@@ -144,3 +143,2 @@ 'dist/*.js': ['coverage', 'espower'] | ||
shell('npm i'); | ||
shell('tsd install --save --overwrite'); | ||
}); | ||
@@ -151,3 +149,2 @@ | ||
shell('npm i'); | ||
//shell('tsd update --save --overwrite'); | ||
}); | ||
@@ -154,0 +151,0 @@ |
@@ -1,2 +0,2 @@ | ||
import './typings/typed-dom'; | ||
import './typed-dom.d'; | ||
export * from 'typed-dom'; |
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
customLaunchers: { | ||
IE11: { | ||
base: 'IE', | ||
'x-ua-compatible': 'IE=EmulateIE11' | ||
} | ||
}, | ||
frameworks: ['mocha'], | ||
files: [ | ||
{ pattern: 'https://cdn.polyfill.io/v2/polyfill.js?features=default,WeakMap,WeakSet', watched: false, served: false, included: true }, | ||
{ pattern: 'node_modules/power-assert/build/power-assert.js', watched: true, served: true, included: true }, | ||
@@ -35,4 +30,5 @@ { pattern: 'dist/*.js', watched: true, served: true, included: true } | ||
autoWatch: true, | ||
autoWatchBatchDelay: 500, | ||
browsers: ['Chrome'] | ||
}); | ||
} | ||
}; |
{ | ||
"name": "typed-dom", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Static typed html dom builder.", | ||
@@ -32,16 +32,17 @@ "private": false, | ||
"devDependencies": { | ||
"del": "^2.2.0", | ||
"@types/mocha": "^2.2.30", | ||
"@types/power-assert": "0.0.27", | ||
"del": "^2.2.2", | ||
"extend": "^3.0.0", | ||
"gulp": "^3.9.1", | ||
"gulp-footer": "^1.0.5", | ||
"gulp-header": "^1.8.2", | ||
"gulp-load-plugins": "^1.2.2", | ||
"gulp-mocha": "^2.2.0", | ||
"gulp-header": "^1.8.8", | ||
"gulp-load-plugins": "^1.2.4", | ||
"gulp-mocha": "^3.0.1", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-typescript": "^2.13.4", | ||
"gulp-uglify": "^1.5.3", | ||
"gulp-typescript": "^2.13.6", | ||
"gulp-uglify": "^2.0.0", | ||
"gulp-unassert": "^1.0.0", | ||
"karma": "0.13.22", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-coverage": "^1.0.0", | ||
"karma": "1.2.0", | ||
"karma-chrome-launcher": "^2.0.0", | ||
"karma-coverage": "^1.1.1", | ||
"karma-coveralls": "^1.1.2", | ||
@@ -51,9 +52,8 @@ "karma-espower-preprocessor": "1.1.0", | ||
"karma-ie-launcher": "^1.0.0", | ||
"karma-mocha": "^1.0.1", | ||
"mocha": "^2.5.0", | ||
"npm-check-updates": "^2.6.5", | ||
"karma-mocha": "^1.1.1", | ||
"mocha": "^3.0.2", | ||
"npm-check-updates": "^2.8.0", | ||
"power-assert": "^1.4.1", | ||
"run-sequence": "^1.2.0", | ||
"tsd": "^0.6.5", | ||
"typescript": "1.9.0-dev.20160513" | ||
"run-sequence": "^1.2.2", | ||
"typescript": "^2.1.0-dev.20160823" | ||
}, | ||
@@ -64,6 +64,3 @@ "scripts": { | ||
"author": "falsandtru", | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://opensource.org/licenses/MIT" | ||
} | ||
"license": "MIT" | ||
} |
@@ -1,2 +0,2 @@ | ||
import {default as Builder, TypedHTML, TypedHTMLContents} from 'typed-dom'; | ||
import {TypedHTML, TypedHTMLContents} from 'typed-dom'; | ||
@@ -6,3 +6,3 @@ export function build<S extends string, T extends HTMLElement, U extends TypedHTMLContents<HTMLElement>>(factory: () => T, contents: U = <any>[], attrs: {} = {}): TypedHTML<S, T, U> { | ||
void Object.keys(attrs) | ||
.forEach(attr => raw.setAttribute(attr, attrs[attr] || '')); | ||
.forEach(name => raw.setAttribute(name, attrs[name] || '')); | ||
void Object.keys(contents) | ||
@@ -9,0 +9,0 @@ .forEach(k => void raw.appendChild(contents[k].raw)); |
@@ -134,3 +134,3 @@ import {TypedHTML as ITypedHTML, TypedHTMLContents} from 'typed-dom'; | ||
<T extends TypedHTMLContents<HTMLElement>> | ||
(contents?: T, attrs?: { [attr: string]: string; }, factory?: () => HTMLElement) | ||
(contents?: T, attrs?: { [name: string]: string; }, factory?: () => HTMLElement) | ||
: TypedHTML<string, HTMLElement, T> => { | ||
@@ -137,0 +137,0 @@ if (!factory && typeof attrs === 'function') { |
@@ -1,4 +0,2 @@ | ||
import TypedHTML, { | ||
TypedHTMLContents | ||
} from 'typed-dom'; | ||
import TypedHTML from 'typed-dom'; | ||
@@ -17,3 +15,3 @@ describe('Interface: Package', function () { | ||
try { | ||
console.log(assert(false === true), assert); // LOG: undefined, function powerAssert() { ... } | ||
console.log(assert(!false === !true), assert); // LOG: undefined, function powerAssert() { ... } | ||
} | ||
@@ -20,0 +18,0 @@ catch (e) { |
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": [ | ||
"dom", | ||
"es6" | ||
], | ||
"module": "amd", | ||
"moduleResolution": "node", | ||
"lib": ["es6", "dom"], | ||
"allowSyntheticDefaultImports": true, | ||
"strictNullChecks": true, | ||
"noImplicitAny": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noUnusedParameters": true, | ||
"noUnusedLocals": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"preserveConstEnums": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"allowUnusedLabels": true, | ||
"preserveConstEnums": true, | ||
"strictNullChecks": true, | ||
"rootDir": "./", | ||
"forceConsistentCasingInFileNames": true, | ||
"removeComments": false | ||
} | ||
}, | ||
"include": [ | ||
"*.ts", | ||
"src/**/*.ts", | ||
"test/**/*.ts" | ||
] | ||
} |
@@ -1,2 +0,3 @@ | ||
export * from './src/export'; | ||
import './src/import'; | ||
export * from './src/export'; | ||
export {default} from './src/export'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1
19
1
33953
20
952