-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dealing with lowercase characters in folder names and made sure folde…
…r name and project name are now always aligned
- Loading branch information
1 parent
f52ea52
commit 2a9ae7b
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -312,10 +312,16 @@ set[str] getRascalReservedIdentifiers() = { n | /lit(n) := #RascalKeywords.defin | |
java str getRascalVersion(); | ||
@doc{Create a folder structure for an empty Rascal project with Maven support} | ||
void newRascalProject(loc folder, str name="my-project", str group="org.rascalmpl", str version="0.1.0-SNAPSHOT") { | ||
void newRascalProject(loc folder, str group="org.rascalmpl", str version="0.1.0-SNAPSHOT") { | ||
if (exists(folder)) { | ||
throw "<folder> exists already. Please provide an non-existing and empty folder name"; | ||
} | ||
str name = folder.file; | ||
if (/[^a-z0-9\-]/ := name) { | ||
throw "Folder <name> should have only lowercase characters, digits and dashes from [a-z0-9\\-]"; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jurgenvinju
Author
Member
|
||
} | ||
mkDirectory(pomFile(folder).parent); | ||
writeFile(pomFile(folder), pomXml(name, group, version)); | ||
mkDirectory(metafile(folder).parent); | ||
|
I remember adding support for spaces in the project name, is that not valid?