Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export DIRENV_WARN_TIMEOUT=2m
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ target
.vscode
tests/*/npm
lib/pkg
.direnv
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,3 +768,18 @@ let output_result = transform(TransformOptions {
specifier_mappings: None,
}).await?;
```

## Developing on DNT
You'll need `Deno`, `rustup` and `Cargo`. If you're a [Nix](https://nixos.org/) user you can just run:
```shell
nix develop
```
in this folder to get a shell with all dependencies satisfied.
You can then build DNT via:
```shell
deno task build
```
and run the tests after via
```
deno task test
```
57 changes: 57 additions & 0 deletions flake.lock

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

33 changes: 33 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
description = "Dnt dev";

nixConfig.bash-prompt = "[dnt-dev]> ";

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs";
};

outputs = inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems =
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, ... }: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.

# NOTE: You can also use `config.pre-commit.devShell`
devShells.default = pkgs.mkShell {
shellHook = ''
echo 1>&2 "Welcome to the DNT development shell!"
'';
buildInputs = with pkgs; [
deno
rustup
cargo
];
};
};
};
}