-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from chatterzhao/master
- Loading branch information
Showing
2 changed files
with
62 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,81 +7,71 @@ permalink: /development | |
--- | ||
|
||
|
||
# Development | ||
> Quick Start Guide to Development | ||
1. Clone: `git clone https://github.com/unit-mesh/auto-dev-vscode.git` | ||
|
||
2. Install Dependencies for project: `cd auto-dev-vscode && npm install` | ||
|
||
3. Install dependencies for gui-sidebar: `cd gui-sidebar && npm install && build` | ||
|
||
4. open `auto-dev-vscode` folder in VSCode | ||
# Quick Start Guide to Contributing | ||
|
||
5. press `F5` to start the extension | ||
|
||
## Contributing | ||
> Quick Start Guide to Contributing | ||
1. Fork: Click this URL [https://github.com/unit-mesh/auto-dev-vscode](https://github.com/unit-mesh/auto-dev-vscode), Click the `Fork` button to create your own copy of this repository | ||
|
||
2. Clone: Use this command in the terminal tool to clone this project to your local machine: | ||
|
||
``` | ||
# Replace "<Your GitHub personal account>" with your GitHub account | ||
# such as "git clone [email protected]:unit-mesh/auto-dev-vscode.git" | ||
git clone [email protected]:<Your GitHub personal account>/auto-dev-vscode.git | ||
``` | ||
|
||
3. PR: Coding or edit documentation of this project, then commit your changes, and finally submit a pull request on GitHub | ||
|
||
|
||
## Install Dependencies | ||
> Before you start developing or debugging, make sure to initialize submodules | ||
1. Clone: If you don't have the [auto-dev-vscode](https://github.com/unit-mesh/auto-dev-vscode) repository yet, please clone it first | ||
# Development | ||
> Uninstall AutoDev extension | ||
> | ||
>If you have previously installed the AutoDev extension in Visual Studio Code, please uninstall it first, then restart Visual Studio Code. | ||
>previously installed extension's configurations can still be automatically applied to cloned projects. | ||
2. Visual Studio Code: Start VSCode and `open` the cloned folder named `auto-dev-vscode`; if you don't have VSCode, you can click here to download: [https://code.visualstudio.com/download](https://code.visualstudio.com/download) | ||
## Quick Start Guide to Development | ||
|
||
3. Install Dependencies: | ||
1. Clone: `git clone https://github.com/unit-mesh/auto-dev-vscode.git` | ||
|
||
``` | ||
2. Install Dependencies for project: `cd auto-dev-vscode && npm install` | ||
|
||
# macOS | ||
3. Install dependencies for gui-sidebar: `cd gui-sidebar && npm install && build` | ||
|
||
# Install nvm to manage different versions of Node.js. | ||
# nvm officially does not recommend installing via brew; a personal VPN is needed for a successful installation in mainland China; Run the following command directly in the terminal: | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | ||
4. open `auto-dev-vscode` folder in VSCode | ||
|
||
5. Press `F5` to launch the extension and begin debugging. | ||
|
||
# Set the node mirror.People in China can use | ||
# Set the mirror source for installing Node.js: | ||
nvm node_mirror https://npmmirror.com/mirrors/node/ | ||
|
||
# Set the mirror source for the npm that comes with the nvm installation: | ||
nvm npm_mirror https://npmmirror.com/mirrors/npm/ | ||
|
||
# Install a specific version of Node.js. | ||
# Note: Errors were encountered with other versions; install this recommended version first. | ||
nvm install v20.11.0 | ||
## Node.js development environment | ||
|
||
# Navigate to the root directory of your project, then use this command to switch the Node.js version: | ||
nvm use v20.11.0 | ||
> Before you start developing or debugging, make sure to initialize submodules | ||
# Set the mirror source for downloading dependencies from npm. | ||
npm config set registry https://registry.npmmirror.com | ||
|
||
# Note:The package.json file uses the npx only-allow npm script, which will prevent the use of any package manager other than npm | ||
### Install nvm : | ||
|
||
Install nvm to manage different versions of Node.js. | ||
|
||
# Install dependencies. | ||
npm install | ||
|
||
``` | ||
# macOS | ||
# nvm officially does not recommend installing via brew; a personal VPN is needed for a successful installation in mainland China; | ||
# Run the following command directly in the terminal: | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | ||
# Set the node mirror.People in China can use | ||
# Set the mirror source for installing Node.js: | ||
nvm node_mirror https://npmmirror.com/mirrors/node/ | ||
# Set the mirror source for the npm that comes with the nvm installation: | ||
nvm npm_mirror https://npmmirror.com/mirrors/npm/ | ||
``` | ||
|
||
|
||
``` | ||
# Windows | ||
# Install nvm, the Node.js version manager, which is used to manage different versions of Node.js (nvm officially does not recommend installing via brew; a personal VPN is required for a successful installation in mainland China). | ||
|
@@ -101,8 +91,28 @@ npm install | |
# Ensure that the installation path for nvm and the path for Node.js are included; if not, create two new entries, one for the nvm installation path and one for the Node.js path. | ||
# Verify Installation: Open Command Prompt or PowerShell and enter the following command to verify that nvm has been installed successfully: | ||
nvm --version | ||
``` | ||
|
||
### Common `nvm` commands. | ||
|
||
``` | ||
nvm install node # Install the latest version of Node.js. | ||
nvm install <version> # Install the specified version of Node.js, nvm install 20.11.0 or nvm install v20.11.0. | ||
nvm use <version> # Switch to the specified version of Node.js. | ||
nvm ls # List the installed versions of Node.js. | ||
nvm current # Display the current version of Node.js being used. | ||
``` | ||
|
||
Tips: After switching Node.js versions with `nvm use <version>`, please delete the `node_modules` folder first, and then run `npm install` to install dependencies. | ||
|
||
|
||
### Install Node.js : | ||
|
||
Note: Right now, with `npm install`, these Node.js versions show: | ||
- v20.11.0 is okay. | ||
- v14.15.4 and v22.7.0 have errors. | ||
|
||
``` | ||
# Install a specific version of Node.js. | ||
# Note: Errors were encountered with other versions; install this recommended version first. | ||
nvm install v20.11.0 | ||
|
@@ -112,53 +122,24 @@ nvm use v20.11.0 | |
# For users in China, please set the Chinese mirror source to solve the problem of slow downloads within the country. | ||
npm config set registry https://registry.npmmirror.com | ||
# Note:The package.json file uses the npx only-allow npm script, which will prevent the use of any package manager other than npm | ||
# Install dependencies | ||
npm install | ||
``` | ||
|
||
4. `Install` dependencies for gui-sidebar: | ||
### Installing Dependencies | ||
|
||
``` | ||
#### In the root Folder | ||
|
||
# Open the terminal command interface in VSCode, and then execute this command to build gui-sidebar: | ||
cd gui-sidebar && cnpm install && buildy | ||
> Note:The package.json file uses the npx only-allow npm script, which will prevent the use of any package manager other than npm | ||
``` | ||
4. `Uninstall` AutoDev extension | ||
If you have previously installed the AutoDev extension in Visual Studio Code, please uninstall it first, then restart Visual Studio Code. | ||
previously installed extension's configurations can still be automatically applied to cloned projects. | ||
|
||
|
||
5. press `F5` to start the extension | ||
Then, in the newly opened window, you can debug the cloned AutoDev extension. | ||
|
||
|
||
|
||
|
||
## Note | ||
|
||
Right now, with `npm install`, these Node.js versions show: | ||
- v20.11.0 is okay. | ||
- v14.15.4 and v22.7.0 have errors. | ||
|
||
Tip: | ||
|
||
Use `nvm` to switch Node.js versions. | ||
|
||
Remove `node_modules` from the root and `gui-sidebar` folders when changing versions. | ||
# Install dependencies. | ||
cd auto-dev-vscode && npm install | ||
``` | ||
|
||
|
||
Common `nvm` commands. | ||
#### In the gui-sidebar Folder | ||
|
||
``` | ||
# Install dependencies | ||
cd gui-sidebar && cnpm install && buildy | ||
``` | ||
|
||
nvm install <version> # Install the specified version of Node.js. | ||
nvm use <version> # Switch to the specified version of Node.js. | ||
nvm ls # List the installed versions of Node.js. | ||
nvm current # Display the current version of Node.js being used. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters