From bfdb0a97e7b2d698f17884aed1891f17f04952b9 Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Thu, 24 Aug 2023 01:07:51 +0200 Subject: [PATCH] added nodejs to flake --- flake.nix | 17 ++++++++++------- package.json | 2 +- start.sh | 4 +++- 3 files changed, 14 insertions(+), 9 deletions(-) mode change 100644 => 100755 start.sh diff --git a/flake.nix b/flake.nix index 8b47e0d..5368e45 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later { - description = "Develop environment for the Workflow Visualiser"; + description = "Development environment for the Workflow Visualiser"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; @@ -43,17 +43,20 @@ devShell = { enable = true; - mkShellArgs.shellHook = '' - if command -v zsh &> /dev/null; then - zsh && exit - fi - ''; + mkShellArgs = { + shellHook = '' + if command -v zsh &> /dev/null; then + zsh && exit + fi + ''; + buildInputs = with pkgs; [ nodejs_18 reuse ]; + }; # Programs you want to make available in the shell. # Default programs can be disabled by setting to 'null' # tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; - hlsCheck.enable = true; + hlsCheck.enable = true; }; }; diff --git a/package.json b/package.json index 7fc6820..308fee4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Visualiser for Uni2work workflows", "type": "module", "scripts": { - "start": "start.sh", + "start": "./start.sh", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/start.sh b/start.sh old mode 100644 new mode 100755 index 4b11056..98ea26a --- a/start.sh +++ b/start.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # SPDX-FileCopyrightText: 2023 David Mosbach # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -6,4 +8,4 @@ echo 'transpiling to JS...' npx tsc echo 'starting server...' -npx http-server --cors -o ./editor.html \ No newline at end of file +npx http-server --cors -o ./editor.html