@nrk/core-docs
Advanced tools
Comparing version 2.0.5 to 2.1.0-0
@@ -10,3 +10,2 @@ import 'raf/polyfill' // Fixes React | ||
import marked from 'marked' | ||
import { transform } from 'buble' | ||
@@ -83,13 +82,8 @@ import 'code-prettify' | ||
function chooseTransform (done) { | ||
try { | ||
transform('Object.assign({a:1}, {b:2})') | ||
done((code) => transform(code, { objectAssign: 'Object.assign' }).code) | ||
} catch (err) { /* use babel when buble fails in IE */ | ||
const script = document.createElement('script') | ||
script.onload = () => done((code) => window.Babel.transform(code, { presets: ['es2015', 'react'] }).code) | ||
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js' | ||
script.setAttribute('charset', 'utf-8') | ||
document.head.appendChild(script) | ||
} | ||
function loadTransform (done) { | ||
const script = document.createElement('script') | ||
script.onload = () => done((code) => window.Babel.transform(code, { presets: ['es2015', 'react'] }).code) | ||
script.src = 'https://unpkg.com/@babel/standalone/babel.min.js' | ||
script.setAttribute('charset', 'utf-8') | ||
document.head.appendChild(script) | ||
} | ||
@@ -191,3 +185,3 @@ | ||
link.insertAdjacentHTML('afterend', generateSubmenu()) | ||
chooseTransform(transform => exec(queryAll('script', main), transform, onHash)) | ||
loadTransform(transform => exec(queryAll('script', main), transform, onHash)) | ||
} | ||
@@ -194,0 +188,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"author": "NRK <opensource@nrk.no> (https://www.nrk.no/)", | ||
"version": "2.0.5", | ||
"version": "2.1.0-0", | ||
"license": "MIT", | ||
@@ -41,3 +41,2 @@ "scripts": { | ||
"@webcomponents/custom-elements": "1.5.0", | ||
"buble": "0.20.0", | ||
"code-prettify": "0.1.0", | ||
@@ -44,0 +43,0 @@ "core-js": "3.18.0", |
@@ -36,3 +36,4 @@ import fs from 'fs' | ||
contentBase: 'lib', | ||
headers: { 'X-UA-Compatible': 'IE=edge' } | ||
headers: { 'X-UA-Compatible': 'IE=edge' }, | ||
port: 10002 | ||
}) | ||
@@ -39,0 +40,0 @@ ] |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
10
2
25013
420
1
- Removedbuble@0.20.0
- Removedacorn@6.4.2(transitive)
- Removedacorn-dynamic-import@4.0.0(transitive)
- Removedacorn-jsx@5.3.2(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedbuble@0.20.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedjsesc@0.5.0(transitive)
- Removedmagic-string@0.25.9(transitive)
- Removedminimist@1.2.8(transitive)
- Removedregenerate@1.4.2(transitive)
- Removedregenerate-unicode-properties@8.2.0(transitive)
- Removedregexpu-core@4.5.4(transitive)
- Removedregjsgen@0.5.2(transitive)
- Removedregjsparser@0.6.9(transitive)
- Removedsourcemap-codec@1.4.8(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedunicode-canonical-property-names-ecmascript@1.0.4(transitive)
- Removedunicode-match-property-ecmascript@1.0.4(transitive)
- Removedunicode-match-property-value-ecmascript@1.2.0(transitive)
- Removedunicode-property-aliases-ecmascript@1.1.0(transitive)