Change module name build_cache to BuildCache
authorNick Downing <downing.nick@gmail.com>
Sat, 20 Oct 2018 03:51:58 +0000 (14:51 +1100)
committerNick Downing <downing.nick@gmail.com>
Sat, 20 Oct 2018 03:51:58 +0000 (14:51 +1100)
.gitignore
BuildCache.js [moved from build_cache.js with 95% similarity]
package.json

index 9cf709a..1826634 100644 (file)
@@ -1 +1 @@
-/build_cache-*.tgz
+/BuildCache-*.tgz
similarity index 95%
rename from build_cache.js
rename to BuildCache.js
index ae88cb5..2fcba41 100644 (file)
@@ -3,11 +3,11 @@ let util = require('util')
 
 let fs_stat = util.promisify(fs.stat)
 
-let BuildCache = function() {
+let BuildCache = function(diag) {
   if (!this instanceof BuildCache)
     throw Error('BuildCache is a constructor')
   this.map = new Map()
-  this.diag = false
+  this.diag = diag || false
 }
 
 BuildCache.prototype.get = async function(key, build_func) {
index 4ef4093..9b50ff0 100644 (file)
@@ -1,8 +1,8 @@
 {
-  "name": "build_cache",
+  "name": "BuildCache",
   "version": "1.0.0",
   "description": "Simple caching scheme that checks for modified sources",
-  "main": "build_cache.js",
+  "main": "BuildCache.js",
   "directories": {},
   "dependencies": {
     "fs": "^0.0.1-security"