mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-29 19:03:44 +00:00
Add devcontainer setup (#4143)
Co-authored-by: Angelos Bouklis <me@arjix.dev> Co-authored-by: JellyBrick <shlee1503@naver.com>
This commit is contained in:
committed by
GitHub
parent
f3d988746a
commit
782204cc63
16
.devcontainer/devcontainer.json
Normal file
16
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||||
|
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
|
||||||
|
{
|
||||||
|
"name": "Pear Desktop - Dev Container",
|
||||||
|
// Keep in sync with `.github/workflows/build.yml`
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/typescript-node:24",
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
|
"features": {},
|
||||||
|
"postCreateCommand": "pnpm install --frozen-lockfile"
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
|
// Configure tool-specific properties.
|
||||||
|
// "customizations": {},
|
||||||
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
|
// "remoteUser": "root"
|
||||||
|
}
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ node_modules
|
|||||||
.idea
|
.idea
|
||||||
|
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
.pnpm-store
|
||||||
.yarn/*
|
.yarn/*
|
||||||
!.yarn/patches
|
!.yarn/patches
|
||||||
!.yarn/plugins
|
!.yarn/plugins
|
||||||
|
|||||||
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "node-terminal",
|
||||||
|
"name": "Run Script: dev (pear-desktop)",
|
||||||
|
"request": "launch",
|
||||||
|
"command": "pnpm run dev",
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
14
README.md
14
README.md
@ -144,6 +144,10 @@ pnpm install --frozen-lockfile
|
|||||||
pnpm dev
|
pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Instead of installing pnpm on your system, you can also use [devcontainers](https://containers.dev/). You can use devcontainers either as a development environment in VS Code, or as a way to easily build the project without installing dependencies on your host system.
|
||||||
|
|
||||||
|
Note that this has it's own limitations (for example, GUI doesn't work on, at least some, Linux hosts).
|
||||||
|
|
||||||
## Build your own plugins
|
## Build your own plugins
|
||||||
|
|
||||||
Using plugins, you can:
|
Using plugins, you can:
|
||||||
@ -279,6 +283,16 @@ export default createPlugin({
|
|||||||
Builds the app for macOS, Linux, and Windows,
|
Builds the app for macOS, Linux, and Windows,
|
||||||
using [electron-builder](https://github.com/electron-userland/electron-builder).
|
using [electron-builder](https://github.com/electron-userland/electron-builder).
|
||||||
|
|
||||||
|
### Building in devcontainer
|
||||||
|
|
||||||
|
1. Clone the repo;
|
||||||
|
2. Open the folder in VS Code;
|
||||||
|
3. Reopen in container when prompted;
|
||||||
|
4. Run `pnpm build` as above (choosing the desired target);
|
||||||
|
5. Collect the built files from the `dist` folder.
|
||||||
|
|
||||||
|
Since devcontainer uses a mount for the workspace, the built files will be available on the host system as well.
|
||||||
|
|
||||||
## Production Preview
|
## Production Preview
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user