-
Notifications
You must be signed in to change notification settings - Fork 234
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
chore: add nx to the repo #65
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,5 @@ node_modules | |
/postgres-data | ||
|
||
/app/styles/tailwind.css | ||
|
||
/.idea | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"extends": "nx/presets/core.json", | ||
"npmScope": "remix", | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "nx/tasks-runners/default", | ||
"options": { | ||
"cacheableOperations": [ | ||
"build-all", | ||
"validate-all", | ||
"build:css", | ||
"build:remix", | ||
"build:server", | ||
"typecheck", | ||
"test:run", | ||
"lint", | ||
"test:e2e:run" | ||
] | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"defaultProjectName": "blues-stack-template" | ||
}, | ||
"pluginsConfig": { | ||
"@nrwl/js": { | ||
"analyzeSourceFiles": false, | ||
"analyzePackageJson": false | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,9 @@ | |
"license": "", | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "run-s build:*", | ||
"build:css": "npm run generate:css -- --minify", | ||
"build:remix": "remix build", | ||
"build:server": "esbuild --platform=node --format=cjs ./server.ts --outdir=build", | ||
"dev": "run-p dev:*", | ||
"dev:server": "cross-env NODE_ENV=development node --inspect --require ./node_modules/dotenv/config --require ./mocks ./build/server.js", | ||
"dev:build": "cross-env NODE_ENV=development npm run build:server -- --watch", | ||
"dev:remix": "cross-env NODE_ENV=development remix watch", | ||
|
@@ -22,11 +20,13 @@ | |
"start": "cross-env NODE_ENV=production node ./build/server.js", | ||
"start:mocks": "cross-env NODE_ENV=production node --require ./mocks --require dotenv/config ./build/server.js", | ||
"test": "vitest", | ||
"test:run": "vitest --run", | ||
"test:e2e:dev": "start-server-and-test dev http://localhost:3000 \"cypress open\"", | ||
"pretest:e2e:run": "npm run build", | ||
"test:e2e:run": "cross-env PORT=8811 start-server-and-test start:mocks http://localhost:8811 \"cypress run\"", | ||
"typecheck": "tsc -b && tsc -b cypress", | ||
"validate": "run-p \"test -- --run\" lint typecheck test:e2e:run" | ||
"build": "nx build-all --output-style=compact", | ||
"dev": "nx build-all --output-style=compact && nx dev-all", | ||
"validate": "nx validate-all --output-style=compact" | ||
}, | ||
"prettier": {}, | ||
"eslintIgnore": [ | ||
|
@@ -76,7 +76,7 @@ | |
"eslint-config-prettier": "^8.5.0", | ||
"happy-dom": "^2.55.0", | ||
"msw": "^0.39.2", | ||
"npm-run-all": "^4.1.5", | ||
"nx": "14.1.4", | ||
"postcss": "^8.4.12", | ||
"prettier": "^2.6.1", | ||
"prettier-plugin-tailwindcss": "^0.1.8", | ||
|
@@ -95,5 +95,39 @@ | |
}, | ||
"prisma": { | ||
"seed": "ts-node --require tsconfig-paths/register prisma/seed.ts" | ||
}, | ||
"nx": { | ||
"targets": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vsavkin If I'm correct, this can be in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. If we're going to have the other config files then let's keep all config in those files. |
||
"build:remix": { | ||
"outputs": [ | ||
"/build/index.js", | ||
"/public/build" | ||
] | ||
}, | ||
"build:server": { | ||
"outputs": [ | ||
"/build/server.js" | ||
] | ||
}, | ||
"build:css": { | ||
"outputs": [ | ||
"/app/styles/tailwind.css" | ||
] | ||
}, | ||
"test:e2e:run": { | ||
"outputs": [ | ||
"/cypress/screenshots", | ||
"/cypress/videos" | ||
], | ||
"dependsOn": [ | ||
"build-all" | ||
] | ||
}, | ||
"test:e2e:dev": { | ||
"dependsOn": [ | ||
"build-all" | ||
] | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "blues-stack-template", | ||
"targets": { | ||
"dev-all": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"commands": [ | ||
{ | ||
"command": "nx dev:server blues-stack-template", | ||
"prefix": "[SERVER]", | ||
"color": "blue" | ||
}, | ||
{ | ||
"command": "nx dev:build blues-stack-template", | ||
"prefix": "[BUILD-]", | ||
"color": "green" | ||
}, | ||
{ | ||
"command": "nx dev:remix blues-stack-template", | ||
"prefix": "[REMIX-]", | ||
"color": "yellow" | ||
}, | ||
{ | ||
"command": "nx dev:css blues-stack-template", | ||
"prefix": "[CSS---]", | ||
"color": "cyan" | ||
} | ||
] | ||
} | ||
}, | ||
"validate-all": { | ||
"executor": "nx:noop", | ||
"dependsOn": ["test:run", "lint", "typecheck", "test:e2e:run"] | ||
}, | ||
"build-all": { | ||
"executor": "nx:noop", | ||
"dependsOn": ["build:css", "build:remix", "build:server"] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,5 @@ | |
"private": true, | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@iarna/toml": "^2.2.5", | ||
"sort-package-json": "^1.55.0" | ||
} | ||
"dependencies": {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file can be removed completely I think, since we don't have any dependencies anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we can probably remove this 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, we can't remove until remix-run/remix#3146 is merged/released There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Released in 1.5.0 |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the global
.gitignore
https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer