Skip to content

Commit

Permalink
Merge pull request #20 from theRAPTLab/dev-sri/build-config-fixes
Browse files Browse the repository at this point in the history
FIX: Build System Configuration Errors
  • Loading branch information
benloh authored Jun 17, 2024
2 parents b39f1e0 + d9a21c8 commit 6ae3d63
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 40 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"node": true
},
"plugins": ["import", "prettier", "react"],
"extends": ["airbnb", "prettier", "prettier/react"],
"extends": ["airbnb", "prettier"],
"globals": {
"PACKAGE_TITLE": "readonly", // injected by webpack
"PACKAGE_VERSION": "readonly", // injected by webpack
"PACKAGE_DESCRIPTION":"readonly", // injected by webpack
"__static":"readonly" // injected by webpack
},
"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
},
Expand Down Expand Up @@ -50,7 +50,8 @@
"prefer-destructuring": "off",
"class-methods-use-this": "off",
"no-param-reassign": "warn",
"react/prop-types": "warn"
"react/prop-types": "warn",
"react/no-unescaped-entities": "off"
},
"settings": {}
}
77 changes: 77 additions & 0 deletions .vscode/vs_env
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# The following script is invoked on Apple OSX machines
# in the .code-workspace setting "terminal.integrated.profiles.osx"

# ANSI Terminal Colors
ALRT="\033[33;1m" # yellow
INFO="\033[34;1m" # blue
NRML="\033[0m" # normal
BOLD="\033[1m" # normal bold

# Check if NVM_DIR is defined (this is set by nvm on startup)
if [ -z "$NVM_DIR" ]; then
printf "\n"
printf "vsenv: ${ALRT}NVM does not appear to be installed${NRML}\n"
printf " Does your ${INFO}~/.zshrc${NRML} have ${INFO}export NVM_DIR${NRML} lines?\n"
printf "\n"
printf " If you haven't installed nvm yet, please follow the instructions\n"
printf " on the NetCreate wiki.\n"
printf " If you are using 'bash' as your default shell, you can copy\n"
printf " these lines to your .zshrc file so nvm will also work in zsh.\n"
return
fi

# Check if shell is opening inside a VSCODE integrated terminal
# is NVM is installed, there is a .nvmrc file and a .vscode directory?
if [ -n "$NVM_DIR" ] && [ -s "./.nvmrc" ] && [ -d "./.vscode" ]; then
NVM_RC=$(cat ./.nvmrc)
NODE_VERSION=$(nvm version $NVM_RC)
NODE_LABEL="$NVM_RC"
if [ "$NVM_RC" != "$NODE_VERSION" ]; then
NODE_LABEL="$NODE_LABEL ($NODE_VERSION)"
fi

printf "\n"
printf "vsenv: VISUAL STUDIO CODE INTEGRATED TERMINAL DETECTED\n"
printf " detected node version is ${INFO}$NODE_LABEL${NRML}\n"
ARCH=$(uname -m)
printf " detected architecture is ${INFO}$ARCH${NRML} (can override in code-workspace)\n"

# check if node binary is in the path
if ! command -v node &> /dev/null; then
printf "\n"
printf "vsenv: ${ALRT}The node binary can not be found! That is weird!${NRML}\n"
printf " This is a possible incompatibility with your shell environment.\n"
printf " Contact your friendly neighborhood developer for help.\n"
printf " your shell: $SHELL\n"
printf " your path: $PATH\n"
printf " your nvm dir: $NVM_DIR\n"
return
else
printf "\n"
printf "vsenv: node binary found at ${INFO}$(command -v node)${NRML}\n"
fi

CURRENT_VERSION=$(node --version)
if [ "$CURRENT_VERSION" != "$NODE_VERSION" ] && [ -n "$str_alias" ]; then
printf "\n"
printf "vsenv: ** WARNING **\n"
printf " This shell is using version ${INFO}$CURRENT_VERSION${NRML}, not the ${ALRT}specified ${INFO}$NODE_VERSION${NRML} in .nvmrc\n"
printf " Type ${ALRT}nvm use${NRML} to use .nvmrc version. You may need to run ${ALRT}npm ci${NRML} again.\n"
printf " If you want to use this version as default, type ${ALRT}nvm alias default $NODE_VERSION${NRML}\n"
fi
else
printf "\n"
printf "vsenv: ${ALRT}Missing .nvmrc file or .vscode folder${NRML}\n"
printf " This script is intended to be used within a VSCODE integrated terminal opened as a Code Workspace.\n"
printf " The project folder should contain a .nvmrc file and a .vscode folder.\n"
fi

# for bash and zsh shells: if ./ is not in PATH, add it to end of PATH
if [[ $PATH != *":./"* ]]; then
export PATH=$PATH:./
printf "\n"
printf "vsenv: adding './' to end of PATH for easier CLI execution in _ur directory!\n"
printf " (applies only to this shell)\n"
fi

printf "\n"
69 changes: 69 additions & 0 deletions meme-2023.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"prettier.arrowParens": "always",
"typescript.suggest.completeJSDocs": false,
"typescript.validate.enable": false,
"typescript.surveys.enabled": false,
"typescript.autoClosingTags": false,
"workbench.colorCustomizations": {},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"**/built": true,
"**/runtime": true,
"**/.vscode": true
},
"terminal.integrated.profiles.osx": {
"x86 macos": {
"path": "/usr/bin/arch",
"args": [
"-arch",
"x86_64",
"${env:SHELL}",
"-i",
"-c",
"export VSCODE_TERM='x86 shell';source ${workspaceFolder}/.vscode/vs_env; exec ${env:SHELL}"
]
},
"arm64 macos": {
"path": "/usr/bin/arch",
"args": [
"-arch",
"arm64",
"${env:SHELL}",
"-i",
"-c",
"export VSCODE_TERM='arm64 shell'; cd ${workspaceFolder}; source .vscode/vs_env; exec ${env:SHELL}"
]
},
"generic macos": {
"path": "${env:SHELL}",
"args": [
"-i",
"-c",
"export VSCODE_TERM='generic bash'; cd ${workspaceFolder}; source .vscode/vs_env; exec ${env:SHELL}"
]
}
},
"terminal.integrated.profiles.linux": {
"generic bash": {
"path": "/bin/bash",
"args": [
"-i",
"-c",
"export VSCODE_TERM='generic bash'; cd ${workspaceFolder}; source .vscode/vs_env; exec ${env:SHELL}"
]
}
},
// this line will force use of the selected profile
// use "x86 macos" to force Rosetta x86 emulation in terminal
"terminal.integrated.defaultProfile.osx": "generic macos",
"terminal.integrated.defaultProfile.linux": "generic bash"
}
}
23 changes: 0 additions & 23 deletions meme-boilerplate.code-workspace

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "meme-boilerplate",
"name": "meme-2023",
"version": "1.3.0",
"title": "MEME",
"description": "Model and Evidence Mapping Environment",
Expand Down
11 changes: 0 additions & 11 deletions tsconfig.json

This file was deleted.

0 comments on commit 6ae3d63

Please sign in to comment.