remark-typescript
Advanced tools
Comparing version
@@ -38,2 +38,3 @@ "use strict"; | ||
function visitor(node, index, parent) { | ||
var _a; | ||
if (/^tsx?/.test(node.lang)) { | ||
@@ -64,2 +65,3 @@ var prevNode = parent.children[index - 1]; | ||
lang: node.lang.replace(/^ts|(?<=\.)ts/g, 'js'), | ||
meta: (_a = node.meta) === null || _a === void 0 ? void 0 : _a.replace(/\.ts/, '.js'), | ||
value: prettier_1.format(code | ||
@@ -66,0 +68,0 @@ .split('\n') |
{ | ||
"name": "remark-typescript", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Transforms TypeScript code blocks to JavaScript and inserts them back into the page", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"test": "jest", | ||
"prepare": "tsc" | ||
"prepublishOnly": "tsc" | ||
}, | ||
@@ -12,0 +12,0 @@ "keywords": [ |
10532
1.37%89
2.3%