<commit_before>source $PWD/__setup/util.sh

installNodePackage(){
  if which $1 &> /dev/null; then
    printSubSubsection "$1 already installed"
  else
    printSubSubsection "Installing $1"
    [ "$OS" == "Darwin" ] && npm install -g $1
    [ "$OS" == "Linux" ] && sudo npm install -g $1
  fi 
}

install(){
    printSection "NODE.JS"

    if [ ! -d $HOME/.nvm ]; then
        printSubSubsection "nvm (and LTS version of node)"
        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
        export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
        [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
        nvm install --lts # this installs the last LTS version of node
        nvm use --lts # this installs the last LTS version of node
    else
        printSubSubsection "nvm (and LTS version of node) already installed"
    fi
    
    if [ ! -f $HOME/.npmrc ]; then
      printSubSubsection "Loading npm informations"
      npm login
    fi
    
    # npm-check-updates
    installNodePackage "npm-check-updates"
    
    # hapi-app-generator
    installNodePackage "hapi-app-generator"

    stowit $PWD/node/base
}

uninstall(){
    echo "To be implemented"
}<commit_msg>add vue.js installation<commit_after>source $PWD/__setup/util.sh

installNodePackage(){
  if which $1 &> /dev/null; then
    printSubSubsection "$1 already installed"
  else
    printSubSubsection "Installing $1"
    [ "$OS" == "Darwin" ] && npm install -g $1
    [ "$OS" == "Linux" ] && sudo npm install -g $1
  fi 
}

install(){
    printSection "NODE.JS"

    if [ ! -d $HOME/.nvm ]; then
        printSubSubsection "nvm (and LTS version of node)"
        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
        export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
        [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
        nvm install --lts # this installs the last LTS version of node
        nvm use --lts # this installs the last LTS version of node
    else
        printSubSubsection "nvm (and LTS version of node) already installed"
    fi
    
    if [ ! -f $HOME/.npmrc ]; then
      printSubSubsection "Loading npm informations"
      npm login
    fi
    
    # npm-check-updates
    installNodePackage "npm-check-updates"
    
    # hapi-app-generator
    installNodePackage "hapi-app-generator"
    
    # hapi client of vue.jsr
    installNodePackage "@vue/cli"

    stowit $PWD/node/base
}

uninstall(){
    echo "To be implemented"
}
{'fraction_non_alphanumeric': 0.13721804511278196, 'fraction_numerical': 0.006766917293233083, 'mean_word_length': 2.529177718832891, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '711872', 'n_tokens_mistral': 960, 'n_tokens_neox': 926, 'n_words': 250}