Skip to content

Commit 2228bbb

Browse files
authored
Add JetBrains IDE debug configs (#2875)
* Add basic JetBrains debug configs * Add comment on debug configs in docs
1 parent ab844ca commit 2228bbb

File tree

10 files changed

+106
-1
lines changed

10 files changed

+106
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ packages/cli/test/functional/test_site_templates/test_project/expected/diagrams/
7575

7676
# JetBrains configurations
7777
.idea/
78-
.run/
7978

8079
# Compiled files from TypeScript
8180
*.js.map

.run/cli _ test.run.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="cli &gt; test" type="js.build_tools.npm">
3+
<package-json value="$PROJECT_DIR$/packages/cli/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="test" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
11+
<browser with-js-debugger="true" />
12+
</EXTENSION>
13+
<method v="2" />
14+
</configuration>
15+
</component>

.run/core _ test.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="core &gt; test" type="js.build_tools.npm" nameIsGenerated="true">
3+
<package-json value="$PROJECT_DIR$/packages/core/package.json" />
4+
<command value="test" />
5+
<node-interpreter value="project" />
6+
<envs />
7+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
8+
<browser with-js-debugger="true" />
9+
</EXTENSION>
10+
<method v="2" />
11+
</configuration>
12+
</component>

.run/root _ build_backend.run.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="root &gt; build:backend" type="js.build_tools.npm">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="build:backend" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
11+
<browser with-js-debugger="true" />
12+
</EXTENSION>
13+
<method v="2" />
14+
</configuration>
15+
</component>

.run/root _ build_docs.run.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="root &gt; build:docs" type="js.build_tools.npm">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="build:docs" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
11+
<browser with-js-debugger="true" />
12+
</EXTENSION>
13+
<method v="2" />
14+
</configuration>
15+
</component>

.run/root _ dev.run.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="root &gt; dev" type="js.build_tools.npm">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="dev" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
11+
<browser with-js-debugger="true" />
12+
</EXTENSION>
13+
<method v="2" />
14+
</configuration>
15+
</component>

.run/root _ test.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="root &gt; test" type="js.build_tools.npm">
3+
<package-json value="$PROJECT_DIR$/package.json" />
4+
<command value="test" />
5+
<node-interpreter value="project" />
6+
<envs />
7+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
8+
<browser with-js-debugger="true" />
9+
</EXTENSION>
10+
<method v="2" />
11+
</configuration>
12+
</component>

.run/serve -d.run.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="serve -d" type="NodeJSConfigurationType" application-parameters="serve -d" path-to-js-file="$PROJECT_DIR$/packages/cli/dist/index.js" working-dir="$PROJECT_DIR$/docs">
3+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
4+
<browser with-js-debugger="true" />
5+
</EXTENSION>
6+
<method v="2" />
7+
</configuration>
8+
</component>

.run/serve.run.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="serve" type="NodeJSConfigurationType" application-parameters="serve" path-to-js-file="$PROJECT_DIR$/packages/cli/dist/index.js" working-dir="$PROJECT_DIR$/docs">
3+
<EXTENSION ID="com.intellij.javascript.debugger.execution.StartBrowserRunConfigurationExtension">
4+
<browser with-js-debugger="true" />
5+
</EXTENSION>
6+
<method v="2" />
7+
</configuration>
8+
</component>

docs/devGuide/development/settingUp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ This page explains how to set up your development environment to start contribut
3535
<box type="tip" seamless>
3636

3737
We recommend the **WebStorm IDE** or **VS Code** for working with MarkBind code.
38+
39+
**JetBrains users:** Run configurations are included in the repository under `.run/`. After cloning, WebStorm (and other JetBrains IDEs) will pick these up automatically. The configurations cover:
40+
- `root | test`, `cli | test`, `core | test` — run the test suites
41+
- `root | build_backend`, `root | build_docs` — build targets
42+
- `root | dev` — starts the dev watcher
43+
- `serve`, `serve -d` — serves the docs site, with and without debug mode
3844
</box>
3945

4046
## Setting up the dev environment

0 commit comments

Comments
 (0)