mirror of
https://github.com/unraid/api.git
synced 2026-01-18 14:39:39 -06:00
chore(web): prepare package.json and env files for monorepo tooling (#1180)
- **Chores** - Streamlined the installation and setup workflow by consolidating multiple commands into a simpler process. - Updated cleaning procedures to ensure complete removal of build artifacts and dependencies. - Adjusted environment file handling for clearer configuration management.
This commit is contained in:
6
justfile
6
justfile
@@ -4,7 +4,7 @@
|
||||
default: list-commands
|
||||
|
||||
list-commands:
|
||||
@just --list --justfile {{justfile()}} --list-heading $'\nMonorepo recipes:\n'
|
||||
@just --list --justfile {{justfile()}} --list-heading $'\nMonorepo recipes:\n'
|
||||
|
||||
# Prepares the repo for development
|
||||
setup:
|
||||
@@ -12,9 +12,7 @@ setup:
|
||||
@just ignore .vscode/settings.json api/.vscode/settings.json web/.vscode/settings.json
|
||||
# ignore api local-state files
|
||||
@just ignore api/dev/states/myservers.cfg api/dev/Unraid.net/myservers.cfg
|
||||
|
||||
just api/setup
|
||||
just web/setup
|
||||
pnpm install
|
||||
|
||||
# restore notification files under api/dev
|
||||
restore-notifications:
|
||||
|
||||
16
package.json
16
package.json
@@ -1,15 +1,19 @@
|
||||
{
|
||||
"name": "unraid-api-monorepo",
|
||||
"private": true,
|
||||
"version": "4.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "pnpm -r build",
|
||||
"deps:check": "manypkg check",
|
||||
"dev": "pnpm -r dev",
|
||||
"test": "pnpm -r test",
|
||||
"lint": "pnpm -r lint",
|
||||
"lint:fix": "pnpm -r lint:fix",
|
||||
"check": "manypkg check"
|
||||
"test": "pnpm -r test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@manypkg/cli": "^0.23.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.4.1",
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
"allowAny": [
|
||||
@@ -28,9 +32,5 @@
|
||||
"ssh2",
|
||||
"vue-demi"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@manypkg/cli": "^0.23.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
"test": "vitest",
|
||||
"test:ui": "vitest --ui",
|
||||
"coverage": "vitest run --coverage",
|
||||
"clean": "rm -rf dist",
|
||||
"clean": "pnpm run clean:build",
|
||||
"clean:build": "pnpx rimraf dist",
|
||||
"clean:deps": "pnpx rimraf node_modules",
|
||||
"prebuild": "npm run clean",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
|
||||
4
web/.gitignore
vendored
4
web/.gitignore
vendored
@@ -1 +1,3 @@
|
||||
!.env.staging
|
||||
# Env vars here shouldn't be secret
|
||||
!.env.*
|
||||
!.env
|
||||
|
||||
@@ -4,11 +4,6 @@ default:
|
||||
@just --list --justfile {{justfile()}} --list-heading $'\nWeb project recipes:\n'
|
||||
@just list-commands
|
||||
|
||||
setup:
|
||||
just ../unraid-ui/setup
|
||||
cp .env.example .env
|
||||
npm install
|
||||
|
||||
clean:
|
||||
rm -rf .nuxt
|
||||
rm -rf node_modules
|
||||
|
||||
@@ -3,59 +3,29 @@
|
||||
"version": "4.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "nuxt dev",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"type-check": "nuxi typecheck",
|
||||
"prebuild:dev": "./scripts/prebuild-webgui-set-env.sh .env.staging",
|
||||
"build:dev": "nuxt build && pnpm run manifest-ts && pnpm run deploy-to-unraid:dev",
|
||||
"postbuild:dev": "./scripts/postbuild-webgui-restore-env.sh",
|
||||
"prebuild:webgui": "./scripts/prebuild-webgui-set-env.sh",
|
||||
"build:webgui": "pnpm run type-check && nuxt build && pnpm run manifest-ts && pnpm run copy-to-webgui-repo",
|
||||
"postbuild:webgui": "./scripts/postbuild-webgui-restore-env.sh",
|
||||
"build": "NODE_ENV=production nuxt build && pnpm run manifest-ts",
|
||||
"deploy-to-unraid:dev": "./scripts/deploy-dev.sh",
|
||||
"copy-to-webgui-repo": "./scripts/copy-to-webgui-repo.sh",
|
||||
"manifest-ts": "node ./scripts/add-timestamp-webcomponent-manifest.js",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
"serve": "NODE_ENV=production PORT=${PORT:-4321} node .output/server/index.mjs",
|
||||
"build:dev": "nuxt build && pnpm run manifest-ts && pnpm run deploy-to-unraid:dev",
|
||||
"build:webgui": "pnpm run type-check && nuxt build && pnpm run manifest-ts && pnpm run copy-to-webgui-repo",
|
||||
"postbuild:dev": "./scripts/postbuild-webgui-restore-env.sh",
|
||||
"postbuild:webgui": "./scripts/postbuild-webgui-restore-env.sh",
|
||||
"clean": "pnpx rimraf .nuxt node_modules",
|
||||
"codegen": "graphql-codegen --config codegen.ts -r dotenv/config",
|
||||
"codegen:watch": "graphql-codegen --config codegen.ts --watch -r dotenv/config",
|
||||
"copy-to-webgui-repo": "./scripts/copy-to-webgui-repo.sh",
|
||||
"deploy-to-unraid:dev": "./scripts/deploy-dev.sh",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"postinstall": "nuxt prepare",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"manifest-ts": "node ./scripts/add-timestamp-webcomponent-manifest.js",
|
||||
"preview": "nuxt preview",
|
||||
"serve": "NODE_ENV=production PORT=${PORT:-4321} node .output/server/index.mjs",
|
||||
"test": "vitest",
|
||||
"test:ci": "vitest run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/cli": "^5.0.3",
|
||||
"@graphql-codegen/client-preset": "^4.5.1",
|
||||
"@graphql-codegen/introspection": "^4.0.3",
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
||||
"@nuxt/devtools": "^1.6.4",
|
||||
"@nuxt/eslint": "^0.7.3",
|
||||
"@nuxtjs/tailwindcss": "^6.12.2",
|
||||
"@rollup/plugin-strip": "^3.0.4",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/eslint-config-prettier": "^6.11.3",
|
||||
"@types/node": "^22",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@unraid/tailwind-rem-to-rem": "^1.1.0",
|
||||
"@vue/apollo-util": "^4.0.0-beta.6",
|
||||
"@vueuse/core": "^12.0.0",
|
||||
"@vueuse/nuxt": "^12.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "^3.14.1592",
|
||||
"nuxt-custom-elements": "2.0.0-beta.18",
|
||||
"prettier": "3.5.1",
|
||||
"prettier-plugin-tailwindcss": "^0.6.9",
|
||||
"shadcn-nuxt": "^0.11.3",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"terser": "^5.37.0",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vitest": "^2.1.3",
|
||||
"vue-tsc": "^2.1.10"
|
||||
"test:ci": "vitest run",
|
||||
"type-check": "nuxi typecheck"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.12.3",
|
||||
@@ -89,14 +59,45 @@
|
||||
"vue-i18n": "^10.0.5",
|
||||
"wretch": "^2.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/cli": "^5.0.3",
|
||||
"@graphql-codegen/client-preset": "^4.5.1",
|
||||
"@graphql-codegen/introspection": "^4.0.3",
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
|
||||
"@nuxt/devtools": "^1.6.4",
|
||||
"@nuxt/eslint": "^0.7.3",
|
||||
"@nuxtjs/tailwindcss": "^6.12.2",
|
||||
"@rollup/plugin-strip": "^3.0.4",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/eslint-config-prettier": "^6.11.3",
|
||||
"@types/node": "^22",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@unraid/tailwind-rem-to-rem": "^1.1.0",
|
||||
"@vue/apollo-util": "^4.0.0-beta.6",
|
||||
"@vueuse/core": "^12.0.0",
|
||||
"@vueuse/nuxt": "^12.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "^3.14.1592",
|
||||
"nuxt-custom-elements": "2.0.0-beta.18",
|
||||
"prettier": "3.5.1",
|
||||
"prettier-plugin-tailwindcss": "^0.6.9",
|
||||
"shadcn-nuxt": "^0.11.3",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"terser": "^5.37.0",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vitest": "^2.1.3",
|
||||
"vue-tsc": "^2.1.10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.30.1"
|
||||
},
|
||||
"packageManager": "pnpm@10.4.1",
|
||||
"overrides": {
|
||||
"vue": "latest",
|
||||
"radix-vue": {
|
||||
"@floating-ui/vue": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@10.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user