Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use `fs.writeFileSync`. #2

Merged
merged 1 commit into from

2 participants

@domenic

This makes Browserify caching actually work (maybe a Windows-only fix?). Without it the cache.json file was always empty.

I am not sure exactly why it was necessary, but it is at least consistent with the rest of the file, which also uses fs.*Sync methods.

@domenic domenic Use `fs.writeFileSync`.
This makes Browserify caching actually work (maybe a Windows-only fix?). I am not sure exactly why, but it is at least consistent with the rest of the file, which also uses `fs.*Sync` methods.
663af38
@domenic domenic referenced this pull request from a commit in YuzuJS/WinningJS-todo
@domenic domenic Cache Browserify AST traversals.
Depends on substack/node-deputy#2 being accepted before this actually does anything.
1e7a044
@domenic domenic referenced this pull request in YuzuJS/WinningJS-todo
Closed

Build faster! #6

@substack substack merged commit 663af38 into from
@substack
Owner

Wow great find! This sped up running the browserify test suite from 0m56.994s to 0m21.529s.

@domenic domenic referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@domenic domenic referenced this pull request in substack/node-browserify
Closed

Use newer deputy so caching works/is fast. #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 6, 2012
  1. @domenic

    Use `fs.writeFileSync`.

    domenic authored
    This makes Browserify caching actually work (maybe a Windows-only fix?). I am not sure exactly why, but it is at least consistent with the rest of the file, which also uses `fs.*Sync` methods.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  index.js
View
2  index.js
@@ -19,7 +19,7 @@ module.exports = function (cacheFile) {
function save (h, res) {
cache[h] = res;
- fs.writeFile(cacheFile, JSON.stringify(cache));
+ fs.writeFileSync(cacheFile, JSON.stringify(cache));
}
function hash (src) {
Something went wrong with that request. Please try again.