You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reshuffled javascript instructions in CONTRIBUTING.md
Repositioned the Javascript sections, splitting them and moving them out of the Windows section. As instructions should be valid for Linux or Mac as well. Where necessary, emphasized important notes for Windows users
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+34-18Lines changed: 34 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Glad that you decided to make your contribution in Dash. This guide provides ins
6
6
### Fork the Dash repository
7
7
When contributing to the Dash repository you should always work in your own copy of the Dash repository. Create a fork of the `dev`-branch, to create a copy of the Dash repository in your own GitHub account. See official instructions for [creating a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) if needed.
8
8
9
-
Clone the forked repository (either of both options will work). Replace `<your_user_name>` with your user name.
9
+
Clone the forked repository (either option will work). Replace `<your_user_name>` with your user name.
When working on a new feature, always create a new branch and create the feature in that branch. For more best practices, read the [Git section](#git).
19
19
20
-
## Building Dash
21
-
22
-
### Windows configuration
23
-
The scripts that run during the build process are designed for a Bash terminal. The default terminals on Windows systems are either PowerShell or Command Prompt. However, the build process will fail (potentially bricking you Node environment) when using these terminals. The listed commands should be executed from a Bash terminal, e.g. you can use the Git Bash terminal (which should be installed when installing Git under default settings). Otherwise, you need to find another way to access a Bash terminal.
20
+
### Configuring your system
24
21
25
22
<details>
23
+
<summary>For JavaScript beginners: What are nvm, npm and Node?</summary>
26
24
27
-
<summary>Set up JavaScript environment (for JavaScript beginners)</summary>
28
-
29
-
#### JavaScript introduction
30
-
If you are new to JavaScript, many aspects of setting up a working environment and working with the new ecosystem can be a bit overwhelming. Especially if Plotly Dash is your first experience with the JavaScript ecosystem. This section is intended to help you set up your JavaScript environment so you can start working with Dash. When setting up JavaScript you will encounter terms as `nvm`, `Node`, and `npm`
31
-
-`nvm` stands for Node Version Manager. This is a tool that allows you to manage Node installations. Quite convenient if you are working on multiple tools that require different versions of Node.js. `nvm` will allow you to switch between Node installations with a single command. `nvm` is not integrated in Windows so a third-party tool needs to be used. If you don't have one yet, you can start with [NVM for Windows](https://github.com/coreybutler/nvm-windows) (`nvm-windows`). This version manager is widely used and is well recommended.
25
+
If you are new to JavaScript, many aspects of setting up a working environment and working with the new ecosystem can be a bit overwhelming. Especially if Plotly Dash is your first experience with the JavaScript ecosystem. This section explains common terms that are used when working with JavaScript environments: `nvm`, `Node`, and `npm`
26
+
-`nvm` stands for Node Version Manager. This is a tool that allows you to manage Node installations. Quite convenient if you are working on multiple tools that require different versions of Node.js. `nvm` allows you to switch between Node installations with a single command.
32
27
-`Node.js` is the actual JavaScript runtime environment. Visit the [official site](https://nodejs.org/en) for more info. Don't download Node just yet, install it through `nvm`.
33
28
-`npm` stands for Node Package Manager. This is the largest software registry for JavaScript packages. Check the [official site](https://docs.npmjs.com/about-npm) for more info.
29
+
30
+
---
31
+
</details>
32
+
33
+
<details>
34
34
35
-
#### JavaScript Installation
36
-
Carefully follow the installation instructions on the [GitHub page](https://github.com/coreybutler/nvm-windows) for NVM for Windows. As recommended by the installation instructions there: uninstall any pre-existsing Node installations. You will run into permission errors otherwise.
37
-
After NVM for Windows has been installed, open any terminal of your preference and install Node and npm:
35
+
<summary>Installing JavaScript on your system</summary>
36
+
37
+
> **For Windows users**: `nvm` is not integrated in Windows so a third-party tool needs to be used. If you don't have one yet, you can start with [NVM for Windows](https://github.com/coreybutler/nvm-windows) (`nvm-windows`). This version manager is widely used and is well recommended.
38
+
>
39
+
> Carefully follow the installation instructions listed on the GitHub page. As recommended by the installation instructions there: uninstall any pre-existsing Node installations. You will run into permission errors otherwise.
40
+
41
+
With `nvm` available from the command line open any terminal of your preference and install Node and npm:
38
42
```
39
43
nvm install latest
40
44
```
@@ -48,17 +52,29 @@ The scripts that run during the build process are designed for a Bash terminal.
48
52
npm -v
49
53
```
50
54
If these commands are not recognized, close the terminal, re-open a new instance and retry. If the commands return a version number, you have set up your JavaScript environment successfully!
51
-
</details>
52
-
53
-
<details>
54
-
<summary> Working with Pycharm </summary>
55
55
56
-
If you work in Pycharm you can open the Dash repo directory as a project (`File -> Open` then browse search for the `dash` directory containing your dash repo, and open the directory as a project). You can configure your Python virtual environment using the Python Interpreter tool. Secondly, you can open the Git Bash terminal in Pycharm and it will automatically activate your selected Python Interpreter in the terminal. You can verify this by executing `pip --version` in the Git Bash terminal, it will show you the path from where pip is run, which is the path where your virtual environment is installed. If you follow these steps, you can skip the first few steps in the overview below.
56
+
---
57
57
</details>
58
58
59
+
## Building Dash
60
+
### For Windows users: use a Bash terminal
61
+
The scripts that run during the build process are designed for a Bash terminal. The default terminals on Windows systems are either PowerShell or Command Prompt. However, the build process will fail (potentially bricking your Node environment) when using these terminals.
62
+
63
+
The listed commands should be executed from a Bash terminal, e.g. you can use the Git Bash terminal (which is normally installed when installing Git using the default settings). Otherwise, you need to find another way to access a Bash terminal.
64
+
59
65
### Build process
60
66
The build process is mostly the same for Windows and Linux systems. Wherever there are differences between the operating systems, it is marked.
If you work in Pycharm you can open the Dash repo directory as a project (`File -> Open` then browse for the `dash` directory containing your dash repo, and open the directory as a project). You can configure your Python virtual environment using the Python Interpreter tool.
72
+
73
+
Secondly, you can open the Git Bash terminal in Pycharm and it will automatically activate your selected Python Interpreter in the terminal. You can verify this by executing `pip --version` in the Git Bash terminal, it will show you the path from where pip is run, which is the path where your virtual environment is installed. If you follow these steps, you can skip the first few steps in the overview below.
74
+
75
+
---
76
+
</details>
77
+
62
78
Open a Bash terminal in the `dash` repository, Git Bash terminal for example on Windows:
0 commit comments