Restructured nim project properly

This commit is contained in:
Sangelo 2023-03-06 23:44:59 +01:00
parent b2012ce370
commit 0dfe2bbe69
5 changed files with 36 additions and 6 deletions

17
config/config.toml Normal file
View file

@ -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"
]

View file

@ -1,5 +0,0 @@
config:
directory: ".vscode"
files:
- "tasks.json"
- "launch.json"

View file

@ -19,7 +19,7 @@ if [[ $OSTYPE == 'darwin'* ]]; then
fi fi
# Compile program # Compile program
nim c -o:bin/niminit niminit && nim c -o:bin/niminit src/niminit &&
# Create local bin folder if it doesn't exist # Create local bin folder if it doesn't exist
mkdir -p $HOME/.local/bin && mkdir -p $HOME/.local/bin &&
# Copy binary to local bin folder # Copy binary to local bin folder

14
niminit.nimble Normal file
View file

@ -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"

View file

@ -1,7 +1,11 @@
import os import os
import strutils import strutils
import strformat import strformat
import parsetoml
# TODO: Make .nimble creator
# OS detection
when defined(windows): when defined(windows):
echo "Warning: Windows is currently unsupported!" echo "Warning: Windows is currently unsupported!"
quit 1 quit 1