(dir)
| 66 | } |
| 67 | |
| 68 | async function artifactHash(dir) { |
| 69 | let files = (await filesIn(dir)).filter(file => path.basename(file) !== 'manifest.json'); |
| 70 | return hash( |
| 71 | Buffer.concat( |
| 72 | await Promise.all( |
| 73 | files.map(async file => |
| 74 | Buffer.concat([Buffer.from(path.relative(dir, file)), await fs.readFile(file)]) |
| 75 | ) |
| 76 | ) |
| 77 | ) |
| 78 | ); |
| 79 | } |
| 80 | |
| 81 | export async function build(name) { |
| 82 | let dir = buildPath(name); |