init
This commit is contained in:
commit
e3c43e06ff
120 changed files with 16894 additions and 0 deletions
14
scripts/clearModules.js
Normal file
14
scripts/clearModules.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const fs = require("fs");
|
||||
|
||||
const clearModules = (filePath) => {
|
||||
if (fs.existsSync(filePath)) {
|
||||
let fileContent = fs.readFileSync(filePath, "utf8");
|
||||
fileContent = fileContent.replace(/require\s*\([\s\S]*?\)/, "");
|
||||
fs.writeFileSync(filePath, fileContent, "utf8");
|
||||
} else {
|
||||
console.log("File does not exist.");
|
||||
}
|
||||
};
|
||||
|
||||
clearModules("go.mod");
|
||||
clearModules("exampleSite/go.mod");
|
||||
Loading…
Add table
Add a link
Reference in a new issue