CesiumLabs / frost

🚀 A static site generator.
https://frost.js.org
MIT License
17 stars 3 forks source link

use github-clone-repo to clone templates #5

Closed twlite closed 2 years ago

twlite commented 2 years ago

We should use github-clone-repo to clone template rather than spawning git command. github-clone-repo does not require you to have git installed. To remove the directory, we can use rimraf.

File that needs to be changed:

https://github.com/DevSnowflake/frost/blob/f197eadf69744b12f6c95aa53643bce7c959ed6d/src/new/index.ts#L1-L38

github-clone-repo example:

const clone = require("github-clone-repo");

clone({
    owner: "DevSnowflake",
    repository: "frost",
    branch: "main",
    outPath: `${__dirname}/output`
}).then(status => {
    if (status) console.log("Success!");
    else console.log("Failed :(");
});
rhygg commented 2 years ago

Will be done, in the next release 👍🏻