Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add development dependencies informations in README #673

Merged
merged 2 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug.log
yarn-error.log
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
httpTimeout 600000
network-timeout 600000
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM mcr.microsoft.com/windows/servercore:ltsc2019

WORKDIR /app

RUN icacls "C:\app" /grant:r everyone:(OI)(CI)F /t

COPY ./scripts/install-nodejs.ps1 ./scripts/install-nodejs.ps1
RUN powershell -Command ./scripts/install-nodejs.ps1

COPY ./scripts/install-yarn.ps1 ./scripts/install-yarn.ps1
RUN powershell -Command ./scripts/install-yarn.ps1

COPY ./scripts/install-python.ps1 ./scripts/install-python.ps1
RUN powershell -Command ./scripts/install-python.ps1

COPY ./scripts/install-vs-build-tools.ps1 ./scripts/install-vs-build-tools.ps1
RUN powershell -Command ./scripts/install-vs-build-tools.ps1

ENV PATH="C:\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Python310;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\Hostx64\x64;${PATH}"

ENV PYTHON="C:\Python310\python.exe"

ENV NODE_OPTIONS="--max-old-space-size=4096"

RUN npm config set python C:\Python310\python.exe

RUN npm config set msvs_version 2022

COPY ./ ./

COPY ./lerna.json.prod ./lerna.json

RUN npm run build
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,14 @@ Find guides and API documentation on the [Wiki](https://github.com/nature-heart-
## Resources

- [Figma](https://www.figma.com/proto/U4A6IwSY8T4W2tm2agW92S/Izabela-v1.0.0?node-id=103%3A4&scaling=min-zoom&page-id=103%3A3&starting-point-node-id=103%3A4)

## Development

The project requires the following in order to run:

- Node 16
- Yarn
- Python 3.10
- Visual Studio Build Tools 2019 or higher
- Desktop development with C++
- Node.js build tools
6 changes: 6 additions & 0 deletions install_vs_build_tools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# install_vs_build_tools.ps1

$vsBuildToolsUri = "https://aka.ms/vs/16/release/vs_buildtools.exe"
Invoke-WebRequest -Uri $vsBuildToolsUri -OutFile vs_buildtools.exe
Start-Process -Wait -FilePath .\vs_buildtools.exe -ArgumentList "--quiet", "--wait", "--norestart", "--nocache", "--installPath=C:\BuildTools", "--add", "Microsoft.VisualStudio.Workload.VCTools", "--add", "Microsoft.VisualStudio.Workload.NodeBuildTools", "--add", "Microsoft.VisualStudio.Component.VC.14.29.C++.x86.x64"
Remove-Item vs_buildtools.exe -Force
10 changes: 10 additions & 0 deletions lerna.json.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"useNx": false,
"version": "0.0.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"npmClient": "yarn",
"npmClientArgs": [
"--prefer-offline"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"bootstrap": "yarn lerna bootstrap --no-ci",
"dev": "yarn bootstrap && yarn lerna run serve --scope izabela-next --stream",
"build": "yarn install && yarn bootstrap && yarn lerna run build",
"docker:build": "docker build -t izabela . && docker create --name dummy izabela && docker cp dummy:dist_electron dist_electron && docker rm -f dummy",
"build:deps": "yarn bootstrap && yarn lerna run build --scope '{@packages/*,@apps/app-server}' --stream",
"build:app": "yarn bootstrap && yarn lerna run build --scope '{@packages/*,@apps/app-server,izabela-next}' --stream",
"patch": "yarn patch-package",
Expand Down
9 changes: 9 additions & 0 deletions scripts/install-nodejs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# install_nodejs.ps1

# Install Node.js
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -OutFile nodejs.zip -UseBasicParsing "https://nodejs.org/dist/v16.20.2/node-v16.20.2-win-x64.zip"
Expand-Archive nodejs.zip -DestinationPath C:\
Rename-Item "C:/node-v16.20.2-win-x64" C:\nodejs
Remove-Item nodejs.zip -Force
[System.Environment]::SetEnvironmentVariable('PATH', $env:PATH + ';C:\nodejs\;C:\nodejs\node_modules\npm\bin', [System.EnvironmentVariableTarget]::Machine)
7 changes: 7 additions & 0 deletions scripts/install-python.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# install_python.ps1

# Install Python 3.10
Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe" -OutFile python-installer.exe
Start-Process -Wait -FilePath python-installer.exe -ArgumentList "/quiet", "InstallAllUsers=1", "TargetDir=C:\Python310"
Remove-Item python-installer.exe -Force
[System.Environment]::SetEnvironmentVariable('PATH', $env:PATH + ';C:\Python310;C:\Python310\Scripts', [System.EnvironmentVariableTarget]::Machine)
8 changes: 8 additions & 0 deletions scripts/install-vs-build-tools-win10.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# install_vs_build_tools.ps1

# Install Visual Studio Build Tools 2022
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_buildtools.exe" -OutFile vs_buildtools.exe
Start-Process -Wait -FilePath vs_buildtools.exe -ArgumentList "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK --includeRecommended --includeOptional --nocache"
Remove-Item vs_buildtools.exe -Force

# List of tools: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022&preserve-view=true#desktop-development-with-c
8 changes: 8 additions & 0 deletions scripts/install-vs-build-tools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# install_vs_build_tools.ps1

# Install Visual Studio Build Tools 2022
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_buildtools.exe" -OutFile vs_buildtools.exe
Start-Process -Wait -FilePath vs_buildtools.exe -ArgumentList "--quiet --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.22000 --includeRecommended --includeOptional --nocache"
Remove-Item vs_buildtools.exe -Force

# List of tools: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022&preserve-view=true#desktop-development-with-c
6 changes: 6 additions & 0 deletions scripts/install-yarn.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# install_yarn.ps1

# Install Yarn
Invoke-WebRequest -Uri "https://yarnpkg.com/latest.msi" -OutFile yarn.msi
Start-Process -Wait -FilePath msiexec.exe -ArgumentList "/i", "yarn.msi", "/quiet"
Remove-Item yarn.msi -Force
26 changes: 25 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,21 @@
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"

"@electron/get@^2.0.0":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@electron/get/-/get-2.0.3.tgz#fba552683d387aebd9f3fcadbcafc8e12ee4f960"
integrity sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==
dependencies:
debug "^4.1.1"
env-paths "^2.2.0"
fs-extra "^8.1.0"
got "^11.8.5"
progress "^2.0.3"
semver "^6.2.0"
sumchecker "^3.0.1"
optionalDependencies:
global-agent "^3.0.0"

"@electron/[email protected]":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.0.5.tgz#b812340e4ef21da2b3ee77b2b4d35c9b86defe37"
Expand Down Expand Up @@ -9906,6 +9921,15 @@ [email protected]:
"@types/node" "^16.11.26"
extract-zip "^2.0.1"

[email protected]:
version "22.3.25"
resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.25.tgz#a9a70b63a6712c658cd7fab343129b2a78450f80"
integrity sha512-AjrP7bebMs/IPsgmyowptbA7jycTkrJC7jLZTb5JoH30PkBC6pZx/7XQ0aDok82SsmSiF4UJDOg+HoLrEBiqmg==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^16.11.26"
extract-zip "^2.0.1"

element-plus@^1.2.0-beta.6:
version "1.2.0-beta.6"
resolved "https://registry.yarnpkg.com/element-plus/-/element-plus-1.2.0-beta.6.tgz#9fa01a06950eb0380f0454cb75aefaaf5b81b043"
Expand Down Expand Up @@ -12204,7 +12228,7 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"

got@^11.7.0:
got@^11.7.0, got@^11.8.5:
version "11.8.6"
resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a"
integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==
Expand Down
Loading