mirror of
https://github.com/SangeloDev/niminit.git
synced 2024-11-24 09:12:41 +00:00
Restructured nim project properly
This commit is contained in:
parent
b2012ce370
commit
0dfe2bbe69
5 changed files with 36 additions and 6 deletions
17
config/config.toml
Normal file
17
config/config.toml
Normal 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"
|
||||
]
|
|
@ -1,5 +0,0 @@
|
|||
config:
|
||||
directory: ".vscode"
|
||||
files:
|
||||
- "tasks.json"
|
||||
- "launch.json"
|
|
@ -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
|
||||
|
|
14
niminit.nimble
Normal file
14
niminit.nimble
Normal 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"
|
|
@ -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
|
Loading…
Reference in a new issue