Web development using parcel, eslint and tslint for linting Javascript, tslint for linting Typescript, prettier for formatting Javascript/Typescript files.
-
Install nodejs. I highly recommend using nvm. If you are on mac or ubuntu, you could use the following command to install nodejs. It's from my dotfiles configuration.
On Mac
curl -L j.mp/srtpdtf > setup && bash setup web vscodeOn Ubuntu
wget -qO- j.mp/srtpdtf > setup && bash setup web vscode -
Clone this repository, install npm packages and open the project in visual studio code. Make sure you have git installed.
git clone --depth=1 https://github.com/technoidentity/parcel-starter.git npm install -g yarn cd parcel-starter && rm -rf .git yarn install code . -
Start server using the following command.
yarn startNow you can edit
src/index.jsin any editor and see your changes in browser immediately.You could use
yarn testto run jest tests.You could use
yarn validatefor checking types, linting all files and run tests insrcfolder.
-
If you use
visual studio code, installvisual studio code extensionsusing the following commandscode --install-extension msjsdiag.debugger-for-chrome code --install-extension ms-vscode.vscode-typescript-tslint-plugin code --install-extension dbaeumer.vscode-eslint code --install-extension esbenp.prettier-vscode
On Mac, you might have to install shell command.
MIT