diff --git a/config/config.toml b/config/config.toml new file mode 100644 index 0000000..9cd9676 --- /dev/null +++ b/config/config.toml @@ -0,0 +1,17 @@ +####################### +# niminit config file # +# (c) Sangelo - 2023 # +####################### +[general] +# Should the home directory appended before the config directory? +appendHome = true +# The path to the config file (no trailing slashes!) +configDirectory = "/.config/niminit" + +[files] +# The directory to be created inside the project +directory = ".vscode" +files = [ + "launch.json", + "tasks.json" +] \ No newline at end of file diff --git a/config/config.yml b/config/config.yml deleted file mode 100644 index 9930064..0000000 --- a/config/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -config: - directory: ".vscode" - files: - - "tasks.json" - - "launch.json" \ No newline at end of file diff --git a/install.sh b/install.sh index 4387686..8e3c207 100755 --- a/install.sh +++ b/install.sh @@ -19,7 +19,7 @@ if [[ $OSTYPE == 'darwin'* ]]; then fi # Compile program -nim c -o:bin/niminit niminit && +nim c -o:bin/niminit src/niminit && # Create local bin folder if it doesn't exist mkdir -p $HOME/.local/bin && # Copy binary to local bin folder diff --git a/niminit.nimble b/niminit.nimble new file mode 100644 index 0000000..9262f86 --- /dev/null +++ b/niminit.nimble @@ -0,0 +1,14 @@ +# Package + +version = "0.1.0" +author = "Sangelo" +description = "A Nim initialising script, because that definitely does not exist already." +license = "GPL-3.0-only" +srcDir = "src" +bin = @["niminit"] + + +# Dependencies + +requires "nim >= 1.6.10" +requires "parsetoml == 0.7.0" \ No newline at end of file diff --git a/niminit.nim b/src/niminit.nim similarity index 98% rename from niminit.nim rename to src/niminit.nim index ebd8e89..e1c3696 100644 --- a/niminit.nim +++ b/src/niminit.nim @@ -1,7 +1,11 @@ import os import strutils import strformat +import parsetoml +# TODO: Make .nimble creator + +# OS detection when defined(windows): echo "Warning: Windows is currently unsupported!" quit 1