summaryrefslogtreecommitdiffstats
path: root/software/javascript.page
blob: 217b6e582ef6d86eb0b9ed871cb7c4f8ed6c5a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

## In-Browser Vanilla Javascript

Alternatives to jQuery: https://blog.garstasio.com/you-dont-need-jquery/


## Development Environment with nvm

Use `nvm` to install nodejs, npm, etc, separately from operating system
packages.

`nvm` asks you to do a curl/bash thing, but you can just download the `nvm.sh`
script, put it in `~/.nvm/nvm.sh`, and source it from `~/.bashrc`. Or do a git
checkout there or something?

    mkdir -p ~/.nvm
    cd ~/.nvm
    wget https://raw.githubusercontent.com/nvm-sh/nvm/master/nvm.sh
    echo 'export NVM_DIR="$HOME/.nvm' >> ~/.bash_profile
    echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bash_profile
    echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> ~/.bash_profile

Then for a specific project, figure out a recent version of node and then:

    cd $PROJECTDIR
    nvm install 18
    nvm use 18

    npm install --global yarn