mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 19:45:26 +00:00
Fix filename escaping issues
This commit is contained in:
@@ -14,6 +14,11 @@ export function posixify(file: string) {
|
||||
return file.replace(/[/\\]/g, '/');
|
||||
}
|
||||
|
||||
export function stringify(string: string, includeQuotes: boolean = true) {
|
||||
const quoted = JSON.stringify(string);
|
||||
return includeQuotes ? quoted : quoted.slice(1, -1);
|
||||
}
|
||||
|
||||
export function fudge_mtime(file: string) {
|
||||
// need to fudge the mtime so that webpack doesn't go doolally
|
||||
const { atime, mtime } = fs.statSync(file);
|
||||
|
||||
Reference in New Issue
Block a user