Skip to content

Commit

Permalink
Merge pull request #356 from replit/vlinkz/defaultentrypoints
Browse files Browse the repository at this point in the history
Add `defaultEntrypoints` field to `runnerOptions`
  • Loading branch information
vlinkz authored Jun 18, 2024
2 parents 259e38c + d077edd commit b28a1ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/moduleit/module-definition.nix
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ let
'';
};

defaultEntrypoints = mkOption {
type = types.listOf (types.str);
default = [ ];
description = lib.mdDoc ''
The default entrypoint files to check if no entrypoint is explicitly defined.
'';
};

} // fileTypeAttrs;

runnerModule = { name, config, ... }: { options = runnerOptions; };
Expand Down
1 change: 1 addition & 0 deletions pkgs/modules/nodejs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ in
language = "javascript";
start = "${nodejs-wrapped}/bin/node $file";
fileParam = true;
defaultEntrypoints = [ "index.js" "main.js" ];
};

dev.debuggers.nodeDAP = {
Expand Down
1 change: 1 addition & 0 deletions pkgs/modules/python/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ in
fileParam = true;
language = "python3";
start = "${python3-wrapper}/bin/python3 $file";
defaultEntrypoints = [ "main.py" "app.py" "run.py" ];
};

replit.dev.debuggers = debuggerConfig;
Expand Down

0 comments on commit b28a1ce

Please sign in to comment.