Skip to content

Commit

Permalink
chore: split out tasks to own file
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Nov 9, 2024
1 parent e6ecdfa commit 4102d9f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
31 changes: 1 addition & 30 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,36 +61,7 @@
nixfmt-rfc-style
nodePackages_latest.nodejs
];
scripts = {
fmt.exec = ''
taplo fmt
cargo fmt --all --check
nixfmt *.nix --width=100
'';
lint.exec = ''
taplo lint
cargo clippy --all-targets --all-features
'';
build.exec = ''
cargo build --release --target wasm32-unknown-unknown
'';
dev.exec = ''
bunx wrangler@latest --config='wrangler.toml' dev
'';
dev-remote.exec = ''
bunx wrangler@latest --config='wrangler.toml' dev --remote
'';
deploy.exec = ''
bunx wrangler@latest deploy --env='production' --config='wrangler.toml'
'';
clean.exec = ''
rm -rf build
rm -rf target
rm -rf node_modules
'';
};
enterShell = '''';

scripts = import ./tasks.nix;
}
];
};
Expand Down
28 changes: 28 additions & 0 deletions tasks.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
fmt.exec = ''
taplo fmt *.toml
cargo fmt --all --check
nixfmt *.nix --width=100
'';
lint.exec = ''
taplo lint *.toml
cargo clippy --all-targets --all-features
'';
build.exec = ''
cargo build --release --target wasm32-unknown-unknown
'';
dev.exec = ''
bunx wrangler@latest --config='wrangler.toml' dev
'';
dev-remote.exec = ''
bunx wrangler@latest --config='wrangler.toml' dev --remote
'';
deploy.exec = ''
bunx wrangler@latest deploy --env='production' --config='wrangler.toml'
'';
clean.exec = ''
rm -rf build
rm -rf target
rm -rf node_modules
'';
}

0 comments on commit 4102d9f

Please sign in to comment.