Skip to content

Commit

Permalink
feat: remove template folder when creating a new project
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Griffon <[email protected]>
  • Loading branch information
Miaxos committed Dec 18, 2023
1 parent b499c9e commit 847e4cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
</p>

----
> [!NOTE]
> Swarmd is still in preview and not every components are yet open sourced. This
is the CLI which is used to interact with Swarmd.

**Warning**: Swarmd is still in preview for now, if you want to have early
access, feel free to drop me a mail at `[email protected]`.

This repository host everything related [Swarmd Workers](https://swarmd.io).

- [`swarmd`](./cli/README.md) is the CLI tool desgined to intereact with [swarmd
workers](https://swarmd.io).
Expand Down
13 changes: 12 additions & 1 deletion cli/src/application/create/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,18 @@ impl SwarmdCommand for CreateArg {
git_hidden_repository.push(".git");
std::fs::remove_dir_all(git_hidden_repository)?;

// TODO(@miaxos): Create the basic config file
let mut typescript_folder = base.clone();
typescript_folder.push("typescript");

let entries = std::fs::read_dir(&typescript_folder)?;

for entry in entries {
let entry = entry?;
let name = entry.file_name();
std::fs::rename(entry.path(), base.join(name))?;
}
std::fs::rename(typescript_folder, base.join("to_delete"))?;
std::fs::remove_dir(base.join("to_delete"))?;

env.println(format!(
"{} {}{} has been {}",
Expand Down

0 comments on commit 847e4cd

Please sign in to comment.