-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A front part of Butem po mieście project, built on Nuxt 3 with:
- min. Windows 10 with WSL,
- local environment (if you haven't already):
- both projects (butem-bedrock-wp and butem-nuxt) are in the same location ( headless-nuxt-wp directory ) on Ubuntu:
-
go to Windows Explorer -> Ubuntu:
-
create directories projects/headless-nuxt-wp in home/[your_user], ie.:
home/[your_user]/projects/headless-nuxt-wp
, -
enter the
projects/headless-nuxt-wp
directory and from a context menu (right-click mouse button) choose Git Bash Here, -
ensure that your current path starts with
://wsl.localhost/...
and ends with.../headless-nuxt-wp
, -
clone both repos (paste those exact commands in order to create the same directories):
git clone https://github.com/butempomiesciepoznan/butem-nuxt.git butem-nuxt
git clone https://github.com/butempomiesciepoznan/butem-bedrock-wp.git butem-bedrock-wp
-
-
open your VS Code, go to bottom left corner and enable WSL Remote, then open the butem-nuxt directory:
-
open an integrated terminal in VS Code, type in
git status
- you should see info that you are on branch main, -
checkout to branch dev:
git checkout dev
- this is a branch for development, you should create all your working branches from this one, -
install Node Version Manager, nodejs and pnpm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- after installation verify your version bynvm -v
nvm install 20.11.0
nvm current
- verify which version of node you are currently running
npm install -g pnpm
Install the dependencies:
pnpm install
Don't forget to adjust your .env file (use a template from .env.example from this repo and name it accordingly to files used in package.json commands - for local development you need to have .env.local file).
Start the development server on http://localhost:3000
(automatically opens a browser):
pnpm dev -o
Build the application for stage environment:
pnpm run stage
Build the application for production:
pnpm run build
Locally preview production build:
pnpm run preview