Merge pull request #3232 from jonathanong/babel-register-cache-mkdirp
babel register cache: make sure the cache file's directory exists
This commit is contained in:
commit
bad98a1056
@ -8,12 +8,13 @@
|
||||
"main": "lib/node.js",
|
||||
"browser": "lib/browser.js",
|
||||
"dependencies": {
|
||||
"babel-core": "^6.3.13",
|
||||
"babel-runtime": "^5.0.0",
|
||||
"core-js": "^1.0.0",
|
||||
"home-or-tmp": "^1.0.0",
|
||||
"path-exists": "^1.0.0",
|
||||
"lodash": "^3.10.0",
|
||||
"source-map-support": "^0.2.10",
|
||||
"babel-core": "^6.3.13",
|
||||
"babel-runtime": "^5.0.0"
|
||||
"mkdirp": "^0.5.1",
|
||||
"path-exists": "^1.0.0",
|
||||
"source-map-support": "^0.2.10"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import { sync as mkdirpSync } from "mkdirp";
|
||||
import homeOrTmp from "home-or-tmp";
|
||||
import pathExists from "path-exists";
|
||||
|
||||
@ -22,6 +23,7 @@ export function save() {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
mkdirpSync(path.dirname(FILENAME));
|
||||
fs.writeFileSync(FILENAME, serialised);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user