Skip to content

Commit 7d17c2c

Browse files
committed
Organize the VSCode settings and debugging.
1 parent 9d07ab6 commit 7d17c2c

7 files changed

+66
-3
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ build/
33
report/
44
coverage/
55
.AppleDouble
6-
.vscode/
76
/.development
87
/.developmentx
98
/.xdevelopment

.vscode/c_cpp_properties.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceFolder}/**",
7+
"/${env.NVM_INC}/**"
8+
],
9+
"defines": [],
10+
"macFrameworkPath": [
11+
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
12+
],
13+
"compilerPath": "/usr/bin/clang",
14+
"cStandard": "c17",
15+
"cppStandard": "c++17",
16+
"intelliSenseMode": "macos-clang-arm64"
17+
}
18+
],
19+
"version": 4
20+
}

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lldb",
9+
"request": "launch",
10+
"name": "Debug tests",
11+
"preLaunchTask": "npm: build:dev",
12+
"program": "${env:NVM_BIN}/node",
13+
"args": ["${workspaceFolder}/tests/tests.js"],
14+
"cwd": "${workspaceFolder}"
15+
}
16+
]
17+
}

.vscode/settings.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"cSpell.words": [
3+
"heya",
4+
"PCRE",
5+
"replacee",
6+
"Submatch"
7+
]
8+
}

.vscode/tasks.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "build:dev",
7+
"group": "build",
8+
"problemMatcher": [],
9+
"label": "npm: build:dev",
10+
"detail": "node-gyp -j max build --debug"
11+
}
12+
]
13+
}

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@
2828
"test": "node tests/tests.js",
2929
"ts-test": "tsc",
3030
"save-to-github": "save-to-github-cache --artifact build/Release/re2.node",
31-
"install": "install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || node-gyp rebuild",
31+
"install": "install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR --skip-path-var RE2_DOWNLOAD_SKIP_PATH --skip-ver-var RE2_DOWNLOAD_SKIP_VER || node-gyp -j max rebuild",
3232
"verify-build": "node scripts/verify-build.js",
33-
"rebuild": "node-gyp rebuild"
33+
"build:dev": "node-gyp -j max build --debug",
34+
"build": "node-gyp -j max build",
35+
"rebuild:dev": "node-gyp -j max rebuild --debug",
36+
"rebuild": "node-gyp -j max rebuild",
37+
"clean": "node-gyp clean",
38+
"reconfigure": "node-gyp configure"
3439
},
3540
"github": "https://github.com/uhop/node-re2",
3641
"repository": {

re2.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const RE2 = require('./build/Release/re2.node');
4+
// const RE2 = require('./build/Debug/re2.node');
45

56
const setAliases = (object, dict) => {
67
for (let [name, alias] of Object.entries(dict)) {

0 commit comments

Comments
 (0)