mirror of
https://github.com/kou029w/nodejs-hands-on.git
synced 2025-02-03 07:38:44 +00:00
Compare commits
No commits in common. "c8688c941ef8b5a299e44f62664a96fbed7a353a" and "970c5e27f14ab54c5c2b7574848053710fbd27e5" have entirely different histories.
c8688c941e
...
970c5e27f1
4 changed files with 4 additions and 34 deletions
|
@ -1,10 +1,9 @@
|
|||
[book]
|
||||
authors = ["Kohei Watanabe"]
|
||||
language = "ja"
|
||||
title = "Node.jsを使う"
|
||||
authors = ["Kohei Watanabe"]
|
||||
|
||||
[output.html]
|
||||
additional-js = ["external-links.js", "regexp-search.js"]
|
||||
edit-url-template = "https://github.com/kou029w/nodejs-hands-on/edit/main/{path}"
|
||||
git-repository-url = "https://github.com/kou029w/nodejs-hands-on"
|
||||
site-url = "/nodejs-hands-on/"
|
||||
git-repository-url = "https://github.com/kou029w/nodejs-hands-on"
|
||||
edit-url-template = "https://github.com/kou029w/nodejs-hands-on/edit/main/{path}"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
// 外部リンクを新しいブラウザーコンテキストで開く
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const selector = ["http:", "https:"]
|
||||
.map((scheme) => `a[href^="${scheme}"]`)
|
||||
.join(",");
|
||||
|
||||
document.querySelectorAll(selector).forEach((a) => {
|
||||
a.target = "_blank";
|
||||
a.rel = "noreferrer";
|
||||
});
|
||||
});
|
|
@ -1,16 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
// 正規表現検索を有効化
|
||||
window.elasticlunr.Index.load = (index) => ({
|
||||
search(keyword) {
|
||||
const regexp = new RegExp(keyword, "gi");
|
||||
|
||||
return [...Object.entries(index.documentStore.docs)].flatMap(
|
||||
([ref, doc]) => {
|
||||
const match = `${doc.title} ${doc.body}`.match(regexp);
|
||||
|
||||
return match ? [{ ref, doc, score: match.length }] : [];
|
||||
},
|
||||
);
|
||||
},
|
||||
});
|
|
@ -11,7 +11,7 @@ VSCodeでNode.jsのプログラムのデバッグを行うには、Auto Attach (
|
|||
|
||||
設定から、Debug › JavaScript: Auto Attach Filter (`debug.javascript.autoAttachFilter`) を変更します (1)。
|
||||
|
||||
`smart` を選択すると、VSCodeターミナルからNode.jsのプロセスを実行したとき[`--inspect`](https://nodejs.org/en/learn/getting-started/debugging)スイッチが有効化され、自動的にデバッグを開始することができます (2)。
|
||||
`smart` を選択すると、VSCodeターミナルからNode.jsのプロセスを実行したとき[`--inspect`](https://nodejs.org/en/docs/guides/debugging-getting-started)スイッチが有効化され、自動的にデバッグを開始することができます (2)。
|
||||
|
||||
自動アタッチを行うにはVSCode内のターミナルを使用しなければなりません。
|
||||
また、Auto Attachを有効にした後、ターミナルを一度再起動する必要があります。これは、ターミナルの右上にある ⚠ アイコンをクリックするか、新しいターミナルを作成することで行えます (3)。
|
||||
|
|
Loading…
Add table
Reference in a new issue