diff --git a/src/nimbus_launch.nim b/src/nimbus_launch.nim index 3e89c4f..2d54894 100644 --- a/src/nimbus_launch.nim +++ b/src/nimbus_launch.nim @@ -6,7 +6,7 @@ # at your option. This file may not be copied, modified, or distributed except according to those terms. import cligen, - os, strutils, tables, + os, strutils, tables, strformat, ./private/[datatypes, error_checking, cligen_extensions, format], ./licensing/license, ./skeleton/[projectNimble, readme] @@ -111,6 +111,32 @@ proc nimbus_launch(projectName: string, genReadme(projectName, githubName, nimbleName, licenses) ) + # 8. Add the source and test skeleton + writeFile( + prjDir & "/src/" & nimbleName & ".nim", + licenseHeader + ) + + var testString = licenseHeader + testString &= &""" + + +import unittest, + ../src/{nimbleName} + +suite "Your first test suite": + test "Your first test": + block: # independant block of subtest + discard + block: + discard +""" + + writeFile( + prjDir & "/tests/all_tests.nim", + testString + ) + when isMainModule: dispatch nimbus_launch