Skip to content

Instantly share code, notes, and snippets.

@mike-at-redspace
Last active January 5, 2023 13:26
Show Gist options
  • Save mike-at-redspace/994073892cf699f3b2456f0e18a3b084 to your computer and use it in GitHub Desktop.
Save mike-at-redspace/994073892cf699f3b2456f0e18a3b084 to your computer and use it in GitHub Desktop.
Webplex Stuff

ZIM env .zshrc stuff

export CACHE_CLEAR_USERNAME=[user]
export CACHE_CLEAR_PASSWORD=[pass]
export ZIM_DEBUG=development

Username/Password used for CACHE_CLEAR can be found here. This allows for cache resets anytime you append the resetCache=true query param.

Install Node via NVM and Homebrew

(optional) Remove existing Node Versions

brew uninstall --ignore-dependencies node 
brew uninstall --force node 

Install NVM on macOS

brew update 
brew install nvm

Install and use Node v14.16.0

nvm install 14.16.0
nvm use 14.16.0
nvm alias default 14.16.0

Add the following to ~/.bashrc or ~/.zshrc:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# Load global yarn binaries
export PATH="$PATH:$(yarn global bin)"

Generate Hosts File

Get a full list of localhost domain mappings to copy and paste to /etc/hosts

grep -Rh --include="hosts.default.js" "name:" packages/lib/webplex-experiences-configs | cut -c11- | sed "s/[']//g" |  sed 's/^/127.0.0.1\t/'

(Optional) Install Python 2 via pyenv for NPM

Gets rid of pesky gyp-node errors

brew install pyenv
pyenv install 2.7.18
pyenv global 2.7.18
npm config --global set python ~/.pyenv/versions/2.7.18/bin/python

(Optional) SonarLint for VSCode with SonarQube Cloud

Adds better linting to VSCode using the rules from the Paramount cloud instanced of SonarQube.

  • Install Java JDK 11 (download)

  • Install SonarLint for VSCode (download)

  • Generate a user token in SonarQube (here / how-to)

  • Add the following to VSCode User Settings JSON:

"sonarlint.connectedMode.connections.sonarqube": [
    {
      "connectionId": "ViacomCBS",
      "serverUrl": "https://sonarde.vmn.io",
      "token": "[token]",
      "disableNotifications": false
    }
  ]

Start & Watch WebPlex (webplex-app/my5-app)

yarn nx start APP_NAME [--debug] [--persistLogs] [--serverPort=8080]

Kid Friendly App (Nick/NickJR)

yarn zim start packages/apps/kf-app

Nx Dependency Graph

yarn nx dep-graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment