Skip to content

Commit

Permalink
feat!(root): move root project to pnpm workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
spicyzboss committed Mar 30, 2024
1 parent 08d6582 commit 12e577e
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 242 deletions.
134 changes: 133 additions & 1 deletion apps/root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,137 @@
"type": "module",
"scripts": {
"generate-pwa-assets": "pwa-assets-generator"
},
"nx": {
"name": "root",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"root": "apps/root",
"sourceRoot": "apps/root/src",
"targets": {
"build": {
"executor": "qwik-nx:build",
"options": {
"runSequence": [
"root:build.client",
"root:build.ssr",
"root:build.functions",
"root:build.cloudflare",
"root:build.bundle"
],
"outputPath": "dist/apps/root"
},
"dependsOn": [
{
"target": "generate-pwa-assets",
"params": "ignore"
}
],
"configurations": {
"preview": {}
}
},
"build.client": {
"executor": "@nx/vite:build",
"options": {
"outputPath": "dist/apps/root",
"configFile": "apps/root/vite.config.ts"
}
},
"build.ssr": {
"executor": "@nx/vite:build",
"defaultConfiguration": "preview",
"options": {
"outputPath": "dist/apps/root"
},
"configurations": {
"preview": {
"ssr": "src/entry.preview.tsx",
"mode": "production"
}
}
},
"build.functions": {
"executor": "nx:run-commands",
"options": {
"command": "cp -r apps/root/functions/ dist/apps/root/functions"
},
"dependsOn": [
"build"
]
},
"build.cloudflare": {
"executor": "@nrwl/vite:build",
"options": {
"outputPath": "dist/apps/root",
"configFile": "apps/root/adapters/cloudflare-pages/vite.config.ts"
},
"dependsOn": [
"build"
]
},
"build.bundle": {
"executor": "nx:run-commands",
"options": {
"commands": [
"mkdir -p dist/apps/root/deploy/",
"cp -r dist/apps/root/client/* dist/apps/root/deploy/",
"cp -r dist/apps/root/functions/ dist/apps/root/deploy/functions/",
"cp -r dist/apps/root/server/ dist/apps/root/deploy/server/",
"echo 'Exported to dist/apps/root/deploy'"
],
"parallel": false
},
"dependsOn": [
"build.cloudflare",
"build.functions"
]
},
"deploy": {
"executor": "nx:run-commands",
"options": {
"command": "wrangler pages deploy dist/apps/root/deploy --project-name=spicyz"
}
},
"preview": {
"executor": "@nx/vite:preview-server",
"options": {
"buildTarget": "root:build",
"port": 4300
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": [
"../coverage/apps/root"
],
"options": {
"passWithNoTests": true,
"reportsDirectory": "../../coverage/apps/root"
}
},
"serve": {
"executor": "@nx/vite:dev-server",
"options": {
"buildTarget": "root:build.client",
"mode": "ssr",
"port": 4200
}
},
"serve.debug": {
"executor": "nx:run-commands",
"options": {
"command": "node --inspect-brk ../../node_modules/vite/bin/vite.js --mode ssr --force",
"cwd": "apps/root"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
]
}
},
"tags": []
}
}
}
146 changes: 0 additions & 146 deletions apps/root/project.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"vitest": "1.4.0",
"wrangler": "^3.41.0"
}
}
}
Loading

0 comments on commit 12e577e

Please sign in to comment.