(cb)
| 181 | } |
| 182 | |
| 183 | function endStream(cb) { |
| 184 | locales.load() |
| 185 | .then(() => { |
| 186 | keys.forEach(key => { |
| 187 | locales.touch(key); |
| 188 | }); |
| 189 | return locales.dump() |
| 190 | .map(out => new Vinyl({ |
| 191 | path: out.path, |
| 192 | contents: Buffer.from(out.data), |
| 193 | })); |
| 194 | }) |
| 195 | .then(files => { |
| 196 | files.forEach(file => { |
| 197 | this.push(file); |
| 198 | }); |
| 199 | cb(); |
| 200 | }) |
| 201 | .catch(cb); |
| 202 | } |
| 203 | |
| 204 | if (options.manifest) { |
| 205 | const mf = require('fs').readFileSync(options.manifest, 'utf8'); |