pmify.com/choco
chocolatey => choco
clink => bash readline and history baked into CMD
gow => ls, grep and other nice bash tools aka "GNU on Windows"
Install with Chocolatey
choco install gow clink-maintained
Getting node and nvm and npm and yarn working on a Windows computer is not trivial.
Here are the basics for getting a good setup:
https://github.com/coreybutler/nvm-windows
Go to releases, and download one of the setup.zips
It will make a file in %appdata%/nvm
Add that new folder into your path!
Now in a new command prompt install a version of node.
nvm install 14.16.0
nvm use v14.16.0
Now you have in your C:/Program Files/nodejs
a link to your %appdata%/nvm/v14.16.0
Add that Program Files folder to your path C:/Program Files/nodejs
.
Now you have NodeJs on Windows.
Note: Whenever you change your path you need to restart your command prompt, or VSCode to be able to find it.
Now go into a fresh command prompt and run:
node
> console.log("Hello World");
You Win. Congrats. GG EZ.
https://code.visualstudio.com/docs/nodejs/nodejs-tutorial
Click the legos icon on the left. Search for Live Server
. Install it.
Download the public folder in this project:
https://github.com/processing/p5.js/wiki/Local-server#node-http-server
Right click on index.html inside VSCode and run with Open with Live Server
And you win again!
https://stackoverflow.com/a/43363255/999943
https://www.faqforge.com/windows/windows-powershell-running-scripts-is-disabled-on-this-system/
In an admin command prompt... run set-executionpolicy remotesigned
C:\Users\peter\AppData\Roaming>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\peter\AppData\Roaming> set-executionpolicy remotesigned
npm install --global yarn
# never run npm again, use yarn
https://p5js.org/get-started/ down at the section Setting up p5.js with an editor on your own computer
https://github.com/processing/p5.js/wiki/Local-server#node-http-server
This is the version I am recommending.
yarn global add http-server
yarn global add browser-sync
Note yarn global add
puts it in C:/Users/username/.node_modules
and just yarn add
puts it in ./project_folder/.node_modules
https://github.com/nishanc/p5js-server
git clone https://github.com/nishanc/p5js-server my-project
Make my-project
the project folder in vscode. (close the folder, and then open the new folder)
Go to Terminal > New Terminal
Now follow the README.md
yarn install
node server # Note: same as node server.js
Now edit public/sketch.js
. Save the file and open localhost:3000
in Chrome.
Mix in some browser sync magic
https://stackoverflow.com/questions/37548537/express-and-browsersync-without-gulp
node server & browser-sync start --proxy 'localhost:3000' --files 'public'
But ampersand doesn't work in Windows...