Skip to content
Permalink
Browse files
  • Loading branch information
aa7401 committed Jun 30, 2017
2 parents 3bdea78 + ebeca07 commit 1f402a48eec7c6a4d064ffdd2762a83ccf39be20
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
@@ -103,4 +103,15 @@ There are plenty of choices when it comes to editors. The examples in this book
Note that you may need to update the configuration database before Visual Studio Code will install.
```
sudo apt-get update && sudo apt-get install libgconf2-4
```
```

### Launching a code editor from the Terminal

You will be spending a lot of time in the terminal so here is a useful tip. If you have visual studio code installed you can launch it with the contents of a specified directory. Start by editing your `.bash_profile` file located in your home directory. Since this is hidden by default you can open it in **nano** using `nano ~/.bash_profile`. Now add the following line, save the changes and exit.
```
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
```
Close the terminal and re-launch. Now you can open any directory.

- `code ~/Documents/bookshop/` opens Visual Studio Code with the contents of the directory specified.
- `code .` opens Visual Studio Code with the contents of the _current directory_.
@@ -434,9 +434,9 @@ You should also add standard JavaScript comments to explain the code itself. The

JSDoc is available as a NodeJS plugin. It has already been added as a _Dev Dependency_ in the `package.json` file and so it should already be installed. Lets use it to build the documentation for our modules.
```
node_modules/.bin/jsdoc modules/
ode_modules/.bin/jsdoc -d docs/jsdoc/ modules/
```
This will create an `out/` directory containing the complete documentation as a website.
This will create a `docs/jsdoc/` directory containing the complete documentation as a website.
```
.
├── fonts

0 comments on commit 1f402a4

Please sign in to comment.