Last active
October 6, 2023 20:05
-
-
Save goforbroke1006/3c67c364f971e01ad150c4de4edb9056 to your computer and use it in GitHub Desktop.
Setup Vue on Ubuntu/Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
# http://localhost:8080/ | |
web-static: | |
ports: [ "8080:80" ] | |
image: nginx:stable | |
volumes: | |
- ./dist/:/usr/share/nginx/html/:r | |
depends_on: | |
web-static-build: | |
condition: service_completed_successfully | |
web-static-build: | |
image: jitesoft/node-yarn:stable-slim | |
working_dir: /code | |
entrypoint: /bin/sh | |
command: | |
- -c | |
- | | |
yarn install | |
npm run build | |
chmod -R 0777 ./ | |
volumes: | |
- ./:/code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
sudo apt update -qq && sudo apt upgrade -yy -qq | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash | |
[ -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 | |
nvm --version | |
nvm install node | |
nvm install v16.20.1 | |
nvm use v16.20.1 | |
node -v | |
npm install --global yarn | |
yarn --version | |
npm install -g @vue/cli # npm update -g @vue/cli | |
npm install -g @vue/cli-init | |
vue --version | |
# Create vue3 or vue2 with typescript and webpack | |
# | |
# vue create my-awesome-project | |
# cd ./my-awesome-project | |
# | |
# vue add typescript | |
# vue add unit-jest | |
# npm run build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew install nvm | |
echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.zshrc | |
source $(brew --prefix nvm)/nvm.sh | |
nvm --version | |
nvm install node | |
nvm install v16.20.1 | |
nvm use v16.20.1 | |
node -v | |
npm install -g @vue/cli | |
npm install -g @vue/cli-init | |
vue --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment