Compare commits
	
		
			2 Commits
		
	
	
		
			d70e660a79
			...
			db6c5f5079
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| db6c5f5079 | |||
| 3700c525ae | 
| @ -98,7 +98,7 @@ function walkDir(parent, sub, opts) { | |||||||
| 
 | 
 | ||||||
|         // TODO stream sha1 (for assets)
 |         // TODO stream sha1 (for assets)
 | ||||||
|         return fs |         return fs | ||||||
|           .readFileAsync(path.join(root, stat.name), null) |           .readFile(path.join(root, stat.name), null) | ||||||
|           .then(function (buffer) { |           .then(function (buffer) { | ||||||
|             var contents = buffer.toString("utf8"); |             var contents = buffer.toString("utf8"); | ||||||
|             file.sha1 = sha1sum(contents); |             file.sha1 = sha1sum(contents); | ||||||
| @ -144,7 +144,7 @@ function getfs(blogdir, filepaths) { | |||||||
|   return forEachAsync(filepaths, function (filepath) { |   return forEachAsync(filepaths, function (filepath) { | ||||||
|     var pathname = safeResolve(blogdir, filepath); |     var pathname = safeResolve(blogdir, filepath); | ||||||
|     return fs |     return fs | ||||||
|       .lstatAsync(pathname) |       .lstat(pathname) | ||||||
|       .then(function (stat) { |       .then(function (stat) { | ||||||
|         return fs.readFile(pathname, null).then(function (buffer) { |         return fs.readFile(pathname, null).then(function (buffer) { | ||||||
|           files.push({ |           files.push({ | ||||||
| @ -304,13 +304,9 @@ function putfs(blogdir, files, options) { | |||||||
|       return forEachAsync(files, function (file) { |       return forEachAsync(files, function (file) { | ||||||
|         // TODO use lastModifiedDate as per client request?
 |         // TODO use lastModifiedDate as per client request?
 | ||||||
|         // TODO compare sha1 sums for integrity
 |         // TODO compare sha1 sums for integrity
 | ||||||
|         // NOTE existsAsync is backwards
 |  | ||||||
|         return fs |         return fs | ||||||
|           .existsAsync(file.realPath) |           .access(file.realPath) | ||||||
|           .then(function () { |           .then(function () { | ||||||
|             return fs.writeFile(file.realPath, file.contents, "utf8"); |  | ||||||
|           }) |  | ||||||
|           .catch(function (/*exists*/) { |  | ||||||
|             if (file.delete || !file.contents) { |             if (file.delete || !file.contents) { | ||||||
|               return fs.unlink(file.realPath); |               return fs.unlink(file.realPath); | ||||||
|             } |             } | ||||||
| @ -321,6 +317,9 @@ function putfs(blogdir, files, options) { | |||||||
| 
 | 
 | ||||||
|             return fs.writeFile(file.realPath, file.contents, "utf8"); |             return fs.writeFile(file.realPath, file.contents, "utf8"); | ||||||
|           }) |           }) | ||||||
|  |           .catch(function () { | ||||||
|  |             return fs.writeFile(file.realPath, file.contents, "utf8"); | ||||||
|  |           }) | ||||||
|           .catch(function (e) { |           .catch(function (e) { | ||||||
|             putfsResults.errors.push({ |             putfsResults.errors.push({ | ||||||
|               type: "file", |               type: "file", | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "desirae", |   "name": "desirae", | ||||||
|   "version": "0.12.2", |   "version": "0.12.3", | ||||||
|   "lockfileVersion": 1, |   "lockfileVersion": 1, | ||||||
|   "requires": true, |   "requires": true, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "desirae", |   "name": "desirae", | ||||||
|   "version": "0.12.2", |   "version": "0.12.3", | ||||||
|   "description": "An in-browser static blog library and static site generator. Similar to Jekyll, Octopress, Nanoc, etc", |   "description": "An in-browser static blog library and static site generator. Similar to Jekyll, Octopress, Nanoc, etc", | ||||||
|   "main": "desirae.js", |   "main": "desirae.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user