Creating your first project
Installing Derw
First we need to install Derw. It's recommended that you use the latest stable version of Node, though most supported versions should work. You need ts-node to run the test runner, so it's recommended to install that too.
Creating a project
Starting a project is as simple as making a directory, then initializing Derw inside it.
Using templates to get started
Derw comes with some templates to get you started. Right now there is only one template: for creating a web app using Derw's html library.
To create a web template, run
Installing editor and CLI utils
Right now the best supported editor is VSCode, with three extensions that can be used in combination to get some nice features
Install vscode-language-server
The language server supports things like inline error messages.
On the vscode store: https://marketplace.visualstudio.com/items?itemName=derw.derw-language-server
Install Derw syntax
Derw syntax highlighting it provided in a separate extension
On the vscode store: https://marketplace.visualstudio.com/items?itemName=derw.derw-syntax
Install auto-formatter
The auto-formatter runs on-save for files with the .derw extension
On the vscode store: https://marketplace.visualstudio.com/items?itemName=derw.derw-formatter-vscode
Install Bash completions
If you use Bash, then you probably want some auto completion.
Clone this repo
Source the
_derw_completions.sh
files in your~/.bashrc
or~/.bash_profile
, usingsource
Restart bash or open a new terminal session
If you're using Linux, you probably want .bashrc
. If you're using OS X, you probably want .bash_profile
.
Example .bashrc or .bash_profile file:
Oh my Zsh
Use bashcompinit
.
Last updated