-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: enable caching of node_modules in builds (#177)
* ci: enable caching of node_modules in builds * chore: upgrade dependencies
- Loading branch information
Showing
6 changed files
with
116 additions
and
79 deletions.
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const { mkdirSync, statSync } = require('fs'); | ||
|
||
const [, , arg] = process.argv; | ||
|
||
if (!arg) { | ||
console.error('Please provide a directory name to create.'); | ||
process.exit(1); | ||
} | ||
|
||
const directory = arg; | ||
|
||
const directoryExists = path => { | ||
try { | ||
return statSync(path).isDirectory; | ||
} catch { | ||
return false; | ||
} | ||
}; | ||
|
||
if (!directoryExists(directory)) { | ||
console.log(`Creating directory for caching: ${directory}`); | ||
mkdirSync(directory); | ||
} |
Oops, something went wrong.