Skip to content

Commit

Permalink
update monorepo tooling (blitz-js#4169)
Browse files Browse the repository at this point in the history
* chore: add nix

This could help contributers... contribute!

* build: use turborepo pipelines for coordination

instead of hacking it with sleeps and such....

* chore: update dev script

now we're cooking with gas! no more hacks, no more awkward flags

* chore: update pnpm version requirement

you want to support v6?? then use a v6-compatible pnpm version

* chore: update pnpm-lock
  • Loading branch information
datner authored Jul 12, 2023
1 parent da76acc commit 0ba2f4e
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 127 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
save-exact=true
dedupe-peer-dependents=true
strict-peer-dependencies=false

public-hoist-pattern[]=secure-password
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
description = "The Blitzjs Monorepo";
nixConfig.bash-prompt = "\[nix:blitz\]$ ";

inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};

flake-utils = {
url = "github:numtide/flake-utils";
};
};

outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = pkgs.alejandra;

devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-18_x
];

shellHook = ''
mkdir -p $out/bin
${pkgs.nodejs-18_x}/bin/corepack enable --install-directory $out/bin
export PATH="$out/bin:$PATH"
'';
};
};
});
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"prepare": "husky install",
"build": "turbo run build",
"build:apps": "turbo run buildapp --concurrency=1",
"dev": "turbo run dev --no-cache --parallel",
"dev": "turbo run dev --filter='./packages/*'",
"lint": "turbo run lint",
"test": "turbo run test",
"clean": "turbo run clean && rm -rf node_modules",
Expand All @@ -34,12 +34,12 @@
"prettier": "^2.7.1",
"prettier-plugin-prisma": "4.4.0",
"pretty-quick": "3.1.3",
"turbo": "1.4.2",
"turbo": "1.10.7",
"vitest": "0.25.3",
"wait-on": "6.0.1"
},
"npmClient": "pnpm",
"packageManager": "pnpm@7.11.0",
"packageManager": "pnpm@8.6.6",
"manypkg": {
"ignoredRules": [
"EXTERNAL_MISMATCH"
Expand Down
11 changes: 11 additions & 0 deletions packages/blitz-auth/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["blitz#build"],
"persistent": true,
"cache": false
}
}
}
11 changes: 11 additions & 0 deletions packages/blitz-next/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["@blitzjs/rpc#build", "blitz#build"],
"persistent": true,
"cache": false
}
}
}
11 changes: 11 additions & 0 deletions packages/blitz-rpc/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["@blitzjs/auth#build", "blitz#build"],
"persistent": true,
"cache": false
}
}
}
11 changes: 11 additions & 0 deletions packages/blitz/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["@blitzjs/generator#build"],
"persistent": true,
"cache": false
}
}
}
Loading

0 comments on commit 0ba2f4e

Please sign in to comment.