forked from iarv/vscode-front-matter
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d82b815fc | |||
| 99701e88a0 | |||
| 6901ae30f5 |
@@ -1,5 +1,9 @@
|
||||
# Change Log
|
||||
|
||||
## [1.16.1] - 2020-05-27
|
||||
|
||||
- Fix for Node.js v14.16.0
|
||||
|
||||
## [1.16.0] - 2020-05-04
|
||||
|
||||
- Add all front matter properties as an argument for custom scripts
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vscode-front-matter",
|
||||
"version": "1.16.0",
|
||||
"version": "1.16.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"displayName": "Front Matter",
|
||||
"description": "Simplifies working with front matter of your articles. Useful extension when you are using a static site generator like: Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...",
|
||||
"icon": "assets/front-matter.png",
|
||||
"version": "1.16.0",
|
||||
"version": "1.16.1",
|
||||
"preview": false,
|
||||
"publisher": "eliostruyf",
|
||||
"galleryBanner": {
|
||||
|
||||
@@ -9,4 +9,4 @@ declare const acquireVsCodeApi: <T = unknown>() => {
|
||||
};
|
||||
|
||||
const elm = document.querySelector("#app");
|
||||
render(<ViewPanel />, elm);
|
||||
render(<ViewPanel />, elm);
|
||||
|
||||
@@ -187,7 +187,12 @@ export class ExplorerView implements WebviewViewProvider, Disposable {
|
||||
if (wsFolders && wsFolders.length > 0) {
|
||||
const wsPath = wsFolders[0].uri.fsPath;
|
||||
|
||||
exec(`${customScript.nodeBin || "node"} ${path.join(wsPath, msg.data.script)} "${wsPath}" "${editor?.document.uri.fsPath}" "${JSON.stringify(article?.data)}"`, (error, stdout) => {
|
||||
let articleData = `'${JSON.stringify(article?.data)}'`;
|
||||
if (os.type() === "Windows_NT") {
|
||||
articleData = `"${JSON.stringify(article?.data).replace(/"/g, `""`)}"`;
|
||||
}
|
||||
|
||||
exec(`${customScript.nodeBin || "node"} ${path.join(wsPath, msg.data.script)} "${wsPath}" "${editor?.document.uri.fsPath}" ${articleData}`, (error, stdout) => {
|
||||
if (error) {
|
||||
window.showErrorMessage(`${msg?.data?.title}: ${error.message}`);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user