🐛(tokens) fix windows generate tokens
The tokens generation was failing on windows because of the path separator. This commit fixes this issue.
This commit is contained in:
committed by
NathanVss
parent
722b66b3ae
commit
479e0777b6
@@ -1,9 +1,10 @@
|
||||
import fs from "fs";
|
||||
import pathHelper from "path";
|
||||
import chalk from "chalk";
|
||||
|
||||
export const put = (path: string, content: string) => {
|
||||
console.log("Generating tokens file to " + path + " ...");
|
||||
const dir = path.substring(0, path.lastIndexOf("/"));
|
||||
const dir = pathHelper.dirname(path);
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user