Skip to content

Commit

Permalink
Organize the VSCode settings and debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhop committed Jun 8, 2024
1 parent 9d07ab6 commit 7d17c2c
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ build/
report/
coverage/
.AppleDouble
.vscode/
/.development
/.developmentx
/.xdevelopment
Expand Down
20 changes: 20 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/${env.NVM_INC}/**"
],
"defines": [],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "macos-clang-arm64"
}
],
"version": 4
}
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug tests",
"preLaunchTask": "npm: build:dev",
"program": "${env:NVM_BIN}/node",
"args": ["${workspaceFolder}/tests/tests.js"],
"cwd": "${workspaceFolder}"
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"cSpell.words": [
"heya",
"PCRE",
"replacee",
"Submatch"
]
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:dev",
"group": "build",
"problemMatcher": [],
"label": "npm: build:dev",
"detail": "node-gyp -j max build --debug"
}
]
}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
"test": "node tests/tests.js",
"ts-test": "tsc",
"save-to-github": "save-to-github-cache --artifact build/Release/re2.node",
"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",
"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",
"verify-build": "node scripts/verify-build.js",
"rebuild": "node-gyp rebuild"
"build:dev": "node-gyp -j max build --debug",
"build": "node-gyp -j max build",
"rebuild:dev": "node-gyp -j max rebuild --debug",
"rebuild": "node-gyp -j max rebuild",
"clean": "node-gyp clean",
"reconfigure": "node-gyp configure"
},
"github": "https://github.com/uhop/node-re2",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions re2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const RE2 = require('./build/Release/re2.node');
// const RE2 = require('./build/Debug/re2.node');

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

0 comments on commit 7d17c2c

Please sign in to comment.