added nodejs to flake
This commit is contained in:
parent
35184a451c
commit
bfdb0a97e7
17
flake.nix
17
flake.nix
@ -3,7 +3,7 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
{
|
{
|
||||||
description = "Develop environment for the Workflow Visualiser";
|
description = "Development environment for the Workflow Visualiser";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
@ -43,17 +43,20 @@
|
|||||||
|
|
||||||
devShell = {
|
devShell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mkShellArgs.shellHook = ''
|
mkShellArgs = {
|
||||||
if command -v zsh &> /dev/null; then
|
shellHook = ''
|
||||||
zsh && exit
|
if command -v zsh &> /dev/null; then
|
||||||
fi
|
zsh && exit
|
||||||
'';
|
fi
|
||||||
|
'';
|
||||||
|
buildInputs = with pkgs; [ nodejs_18 reuse ];
|
||||||
|
};
|
||||||
|
|
||||||
# Programs you want to make available in the shell.
|
# Programs you want to make available in the shell.
|
||||||
# Default programs can be disabled by setting to 'null'
|
# Default programs can be disabled by setting to 'null'
|
||||||
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
|
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
|
||||||
|
|
||||||
hlsCheck.enable = true;
|
hlsCheck.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"description": "Visualiser for Uni2work workflows",
|
"description": "Visualiser for Uni2work workflows",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "start.sh",
|
"start": "./start.sh",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
4
start.sh
Normal file → Executable file
4
start.sh
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2023 David Mosbach <david.mosbach@campus.lmu.de>
|
# SPDX-FileCopyrightText: 2023 David Mosbach <david.mosbach@campus.lmu.de>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
@ -6,4 +8,4 @@
|
|||||||
echo 'transpiling to JS...'
|
echo 'transpiling to JS...'
|
||||||
npx tsc
|
npx tsc
|
||||||
echo 'starting server...'
|
echo 'starting server...'
|
||||||
npx http-server --cors -o ./editor.html
|
npx http-server --cors -o ./editor.html
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user